
9 Dec
2008
9 Dec
'08
5:29 p.m.
Is there a change in strictness with the following transformation? It seems like scanr should be a good consumer and a good producer, intuitively. scanrFB :: (a -> b -> b) -> b -> [a] -> (b -> c -> c) -> c -> c scanrFB f x ls c n = snd (foldr (\ x (b, bs) -> let b' = f x b in (b', b' `c` bs)) (x, n) ls) {-# RULES "scanr" [~1] forall f x l . scanr f x l = build (scanrFB f x l); -# RULES} -- Louis Wasserman wasserman.louis@gmail.com
6008
Age (days ago)
6008
Last active (days ago)
0 comments
1 participants
participants (1)
-
Louis Wasserman