
15 Oct
2003
15 Oct
'03
8:31 p.m.
On Wed, 15 Oct 2003 17:07:00 +0100
Graham Klyne
[[ lp [] = [[]] lp (as:ass) = concatMap (\a -> (map (a:) (lp ass))) as ]]
I think I should also be able to eliminate the lambda-abstraction, but I can't see how. I prefer the list comprehension, as I find that easier to read than the \-expression.
lp (as:ass) = concatMap (flip map (lp ass) . (:)) as but better, lp = sequence