
22 Jul
2009
22 Jul
'09
2:14 p.m.
What is the use case(s) for this function? lements from the front of a list. However the
criteria are somewhat complex.
walk f [] = [] walk f (x:xs) = case f x of Just g -> x : walk g xs Nothing -> []
For each item the `predicate' f either returns Nothing, when it thinks we should not take any more elements, or return Just another `predicate' to apply to the next element.
However the type system does not like my function. How can I mollify it? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe