{"action":"opened","issue":{"url":"https://api.github.com/repos/openscore/score-language/issues/30","labels_url":"https://api.github.com/repos/openscore/score-language/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/openscore/score-language/issues/30/comments","events_url":"https://api.github.com/repos/openscore/score-language/issues/30/events","html_url":"https://github.com/openscore/score-language/issues/30","id":54154309,"number":30,"title":"Loops in slang (DSL)","user":{"login":"orius123","id":4418018,"avatar_url":"https://avatars.githubusercontent.com/u/4418018?v=3","gravatar_id":"","url":"https://api.github.com/users/orius123","html_url":"https://github.com/orius123","followers_url":"https://api.github.com/users/orius123/followers","following_url":"https://api.github.com/users/orius123/following{/other_user}","gists_url":"https://api.github.com/users/orius123/gists{/gist_id}","starred_url":"https://api.github.com/users/orius123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orius123/subscriptions","organizations_url":"https://api.github.com/users/orius123/orgs","repos_url":"https://api.github.com/users/orius123/repos","events_url":"https://api.github.com/users/orius123/events{/privacy}","received_events_url":"https://api.github.com/users/orius123/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openscore/score-language/labels/help+wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-13T06:07:02Z","updated_at":"2015-01-13T06:07:02Z","closed_at":null,"body":"Ok, so I want ti start with defining how loops will look in our slang.\r\n\r\nLets take this basic flow as an example\r\n\r\n```yaml\r\nflow:\r\n  inputs: \r\n    - list_input: [1,2,3]\r\n    - normal_input\r\n  workflow:\r\n    iter_task:\r\n      do:\r\n        ops.print:\r\n          - list_input\r\n          - normal_input\r\n```\r\n\r\nI was thinking of few ways we can go:\r\nCurrently those two ways don't give a way to aggregate the result,\r\nand therefore they are not so useful because you can't publish to next tasks. \r\n(you can still make void action for each though)\r\n\r\n**For..do**\r\n```yaml\r\niter_task:\r\n  # We can use another word of course like foreach..\r\n  for: input in list_input\r\n  do: \r\n    ops.print:\r\n      - input\r\n      - normal_input\r\n```\r\nPros:\r\n- verbose\r\n- clean\r\n\r\nCons:\r\n- verbose\r\n\r\n**For inline**\r\n```yaml\r\niter_task:\r\n  do: \r\n    ops.print:\r\n      - input in list_input\r\n      - normal_input\r\n```\r\nPros:\r\n- less to write\r\nCons:\r\n- theoretically i can iterate over more than one input (matrix)\r\n\r\nLets here you.\r\n@meshipeer @oritstone @meirwah @avimora @TudorLesanHP @Bonczidai @lrevnic @avigail-oron\r\n\r\nwhich one did you like?\r\ndo you have another suggestion?\r\ndo you think we need to give an option to stop the iteration according to a condition? (while style..)\r\ndo you think we need to aggregate the result? and how?\r\n\r\n\r\n"}}