- 2020-10-21: Curry `key` from
secondPassFilter :: Ord a => a -> Set a -> Maybe b
secondPassFilter key = spf key . Set.lookupGE key
Givenspf :: a -> Maybe a -> Maybe b
- 2020-10-21: given:
updater :: b -> Maybe b
andfirstPass :: Ord a => Map a b -> Map a b
firstPass m = foldr (Map.update updater) m (Map.keys m)
#Curry away `m` from the firstPass-function - Social Justice Cleric @noaheasterly
firstPass = foldr (Map.update updater) <*> Map.keys
- 2020-10-20:
all (\c -> any (`isPrefixOf` c) setb) notinb
#Curry away the `c` lambda argument.
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.
Wednesday, October 21, 2020
October 2020 Haskell 1-Liners
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment