- November 5th, 2017: f :: Map Int [a] -> [b] - > [(Int, b)]
for, e.g.: f mapping bs
length bs == length (concat (Map.elems mapping))
define f - Andreas Källberg @Anka213 Using parallel list comprehensions:
f mp bs = [ (k,b) | (k,as) <-assocs mp, a <- as | b <- bs] - Steve Trout @strout f = zip . foldMapWithKey (fmap . const)
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.
Friday, December 29, 2017
November 2017 1HaskellADay 1Liner problem and solutions
Subscribe to:
Posts (Atom)