else False
else True
+@inline
+filter :: (a -> <e> Boolean) -> T a -> <Proc,e> ()
+filter f it = loop ()
+ where
+ loop _ =
+ if hasNext it
+ then do
+ if f (next it)
+ then ()
+ else remove it
+ loop ()
+ else ()
+
@inline
mapFirst :: (a -> <e> Maybe b) -> T a -> <Proc,e> Maybe b
mapFirst f it = loop ()