Hacker News new | ask | show | jobs
by tel 4574 days ago
Btw, here are a few example variants of `L`

    sum :: Num a => L a a
    sum = L id (+) 0

    prod :: Num a => L a a
    prod = L id (*) 1

    list :: L a [a]
    list = id (\r a -> a : r) []