- January 26th, 2016: define line2Bio so that
 *Main> line2Bio "Birches by Robert Frost" ~> ("Birches","Robert Frost")
 (in 1 line)
- Gautier DI FOLCO @gautier_difolco
 import Data.Bifunctor
 line2Bio = bimap unwords (unwords . tail) . break (== "by") . words
- matthieu bulté @matthieubulte
 line2Bio = on bimap (unwords .) id tail . break (== "by") . words
- January 26th, 2016: define swap points-free:
 swap :: (a,b) -> (b, a)
- matthieu bulté @matthieubulte
 swap = uncurry (flip (,))
- Noah Luck Easterly @walkstherain
 uncurry $ flip (,)
- Андреев Кирилл @nonaem00
 import Control.Arrow
 swap = snd &&& fst
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, February 11, 2016
January 2016 Haskell One-liners
Subscribe to:
Post Comments (Atom)
 
No comments:
Post a Comment