Closed samhh closed 2 years ago
firstGood :: Alternative m => [a -> m b] -> a -> m b firstGood [] _ = empty firstGood (f:gs) x = f x <|> firstGood gs x
Option
Foldable
https://github.com/samhh/fp-ts-std/commit/c96a0d8dd53c8fb98291246fe82538e3ca1c5155
I think it doesn't exist in Haskell because of Haskell's laziness, allowing you to just flap and choice (altAll).
flap
choice
altAll
Option
Foldable
too?