{"action":"created","issue":{"url":"https://api.github.com/repos/fable-elmish/elmish/issues/133","repository_url":"https://api.github.com/repos/fable-elmish/elmish","labels_url":"https://api.github.com/repos/fable-elmish/elmish/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/fable-elmish/elmish/issues/133/comments","events_url":"https://api.github.com/repos/fable-elmish/elmish/issues/133/events","html_url":"https://github.com/fable-elmish/elmish/issues/133","id":293550336,"number":133,"title":"Add isNone to Cmd","user":{"login":"robkuz","id":954793,"avatar_url":"https://avatars2.githubusercontent.com/u/954793?v=4","gravatar_id":"","url":"https://api.github.com/users/robkuz","html_url":"https://github.com/robkuz","followers_url":"https://api.github.com/users/robkuz/followers","following_url":"https://api.github.com/users/robkuz/following{/other_user}","gists_url":"https://api.github.com/users/robkuz/gists{/gist_id}","starred_url":"https://api.github.com/users/robkuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robkuz/subscriptions","organizations_url":"https://api.github.com/users/robkuz/orgs","repos_url":"https://api.github.com/users/robkuz/repos","events_url":"https://api.github.com/users/robkuz/events{/privacy}","received_events_url":"https://api.github.com/users/robkuz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-01T14:29:01Z","updated_at":"2018-02-01T14:46:10Z","closed_at":null,"author_association":"NONE","body":"When working with deeply nested `update` structures where parents call child `update` methods and rewrap the childrens returned sub cmds it would be nice to be able to have a generic means to shortcircuit when a child returns a `Cmd.none` so one does not end with a structure like \r\n`Cmd.map GrandparentMsg (Cmd.map ParentMsg Cmd.none)`\r\n\r\nbut one could do something like this\r\n\r\n    if isNone subCmd then\r\n       Cmd.none // this would return now a none of parent type\r\n    else\r\n       Cmd.map ParentMsg subCmd\r\n\r\nanyone can write this in his own code but it would be nice to have it as part of the standard lib\r\n\r\n    let isNone (x:List<_>) = List.length x = 0\r\n"},"comment":{"url":"https://api.github.com/repos/fable-elmish/elmish/issues/comments/362287066","html_url":"https://github.com/fable-elmish/elmish/issues/133#issuecomment-362287066","issue_url":"https://api.github.com/repos/fable-elmish/elmish/issues/133","id":362287066,"user":{"login":"robkuz","id":954793,"avatar_url":"https://avatars2.githubusercontent.com/u/954793?v=4","gravatar_id":"","url":"https://api.github.com/users/robkuz","html_url":"https://github.com/robkuz","followers_url":"https://api.github.com/users/robkuz/followers","following_url":"https://api.github.com/users/robkuz/following{/other_user}","gists_url":"https://api.github.com/users/robkuz/gists{/gist_id}","starred_url":"https://api.github.com/users/robkuz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robkuz/subscriptions","organizations_url":"https://api.github.com/users/robkuz/orgs","repos_url":"https://api.github.com/users/robkuz/repos","events_url":"https://api.github.com/users/robkuz/events{/privacy}","received_events_url":"https://api.github.com/users/robkuz/received_events","type":"User","site_admin":false},"created_at":"2018-02-01T14:46:10Z","updated_at":"2018-02-01T14:46:10Z","author_association":"NONE","body":"    | RunExtension msg      ->\r\n        let (submodel, subcmd) = updateExtension msg model.extension\r\n        {model with extension = submodel}, Cmd.map RunExtension subcmd\r\n\r\njust imagine that code above and assume that subcmd returns a `Cmd.none` what happens now?\r\n"}}
{"actor":{"display_login":"robkuz"}}