[Haskell-cafe] How to create a list of each constructor value
Henning Thielemann
lemming at henning-thielemann.de
Wed Nov 30 15:39:42 UTC 2022
On Wed, 30 Nov 2022, PICCA Frederic-Emmanuel wrote:
>> Also, you can simplify the "map pure (...)" by using `elements` :)
>
> thanks
>
> another question I have plenty of instance build like this
>
> instance Arbitrary TypeA where
> arbitrary = TypeA <$> arbitrary <*> arbitrary ... <*> arbitrary
uncurry TypeA <$> arbitrary
uncurry3 TypeA <$> arbitrary
would be a bit shorter if this is important.
More information about the Haskell-Cafe
mailing list