Wouter Swierstra wrote:
> I pleased to announce that the latest issue of The Monad.Reader is now
> available:
> [...]
Horray, the long awaited new issue of my favorite breakfast reading is out!
> * Bernie Pope - Getting a Fix from the Right Fold
> [...]
Concerning the strictness of dwBackwards, it suffices to make the
pattern match on (ys,xs) irrefutable:
dwBackwards predicate = fst . dwPairs predicate
dwPairs :: (a -> Bool) -> [a] -> ([a], [a])
dwPairs predicate = foldr combine base
where
--> combine next ~(ys, xs)
| predicate next = (ys, next:xs)
| otherwise = (next:xs, next:xs)
base = ([], [])
Regards,
apfelmus
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe