You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 9, 2019. It is now read-only.
I was thinking something like:
listOfLength: Int -> Fuzzer a -> Fuzzer (List a)
This looks like it shouldn't be too hard to generalize from the existing list function. The major benefit would be to allow users to decide their own probability distribution over the generated list length (using something like Fuzz.andThen). This is what motivated me to suggest this and it would limit the severity of #168 .
This is already possible with what's provided, but it could be easier:
listOfLength : Int -> Fuzzer a -> Fuzzer (List a)
listOfLength listLen fuzzer =
List.foldl
(Fuzz.map2 (\elem -> \list -> elem :: list))
(Fuzz.constant [])
(List.repeat listLen fuzzer)
The text was updated successfully, but these errors were encountered:
I was thinking something like:
listOfLength: Int -> Fuzzer a -> Fuzzer (List a)
This looks like it shouldn't be too hard to generalize from the existing list function. The major benefit would be to allow users to decide their own probability distribution over the generated list length (using something like Fuzz.andThen). This is what motivated me to suggest this and it would limit the severity of #168 .
This is already possible with what's provided, but it could be easier:
The text was updated successfully, but these errors were encountered: