{"action":"closed","issue":{"url":"https://api.github.com/repos/elm-community/elm-test/issues/158","repository_url":"https://api.github.com/repos/elm-community/elm-test","labels_url":"https://api.github.com/repos/elm-community/elm-test/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/elm-community/elm-test/issues/158/comments","events_url":"https://api.github.com/repos/elm-community/elm-test/issues/158/events","html_url":"https://github.com/elm-community/elm-test/issues/158","id":230456977,"number":158,"title":"Proposal: Fuzz.oneOf","user":{"login":"Janiczek","id":149425,"avatar_url":"https://avatars1.githubusercontent.com/u/149425?v=3","gravatar_id":"","url":"https://api.github.com/users/Janiczek","html_url":"https://github.com/Janiczek","followers_url":"https://api.github.com/users/Janiczek/followers","following_url":"https://api.github.com/users/Janiczek/following{/other_user}","gists_url":"https://api.github.com/users/Janiczek/gists{/gist_id}","starred_url":"https://api.github.com/users/Janiczek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Janiczek/subscriptions","organizations_url":"https://api.github.com/users/Janiczek/orgs","repos_url":"https://api.github.com/users/Janiczek/repos","events_url":"https://api.github.com/users/Janiczek/events{/privacy}","received_events_url":"https://api.github.com/users/Janiczek/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-22T16:52:58Z","updated_at":"2017-05-26T23:01:27Z","closed_at":"2017-05-26T23:01:27Z","body":"Would this be worthwhile to have in `elm-test`?\r\n\r\n```elm\r\n{-| Fuzzer that chooses a value from a collection of values.\r\n-}\r\noneOf : List a -> Fuzzer a\r\noneOf list =\r\n    list\r\n        |> List.map (\\x -> ( 1, Fuzz.constant x ))\r\n        |> Fuzz.frequency\r\n```\r\n\r\nOr a more general version that works on fuzzers instead of values:\r\n\r\n```elm\r\n{-| Fuzzer that chooses a fuzzer from a collection of fuzzers.\r\n-}\r\noneOf : List (Fuzzer a) -> Fuzzer a\r\noneOf list =\r\n    list\r\n        |> List.map (\\x -> ( 1, x ))\r\n        |> Fuzz.frequency\r\n```\r\n\r\n(Version of this for old `frequency` can be found in [elm-test-extra](http://package.elm-lang.org/packages/ktonon/elm-test-extra/1.5.0/Fuzz-Extra#uniformOrCrash))"}}
{"actor":{"display_login":"Janiczek"}}