- August 20th, 2016: maybeify :: (a, Maybe b) -> Maybe (a, b)
Define maybeify. Snaps for elegance. - Hardy Jones @st58 sequence
- Bruno @Brun0Cad mapM id
- Thomas D @tthomasdd {-# LANGUAGE TupleSections #-}
mabeify (x,mY) = maybe Nothing (return . (x,)) mY - Андреев Кирилл @nonaem00 import "category-extras" Control.Functor.Strong
maybeify = uncurry strength - bazzargh @bazzargh I can't beat 'sequence', but: uncurry (fmap.(,))
- Nick @crazy_fizruk distribute (from Data.Distributive)
Incorporates strong typing over predicate logic programming, and, conversely, incorporates predicate logic programming into strongly typed functional languages. The style of predicate logic is from Prolog; the strongly typed functional language is Haskell.
Thursday, September 15, 2016
August 2016 1HaskellADay 1Liners
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment