Add support for `Scan`
Closed this issue · 1 comments
Ericson2314 commented
Fold : foldl :: Scan : mapAccumL
data Scan a b = forall x. Scan (x -> a -> (x, b)) x
prescan
and postscan
along aren't good enough because there's no way to recover the identity Scan
:
id :: Scan a a
id = Scan (\()-> \a -> ((), a)) ()
Ericson2314 commented
#28 (comment) Ah I see you thought of this too. I have started working on this. I'll finish it if you want it.