1 import "JavaBuiltin" as Java
3 importJava "java.util.Iterator" where
6 hasNext :: T a -> <Proc> Boolean
7 next :: T a -> <Proc> a
8 remove :: T a -> <Proc> ()
11 iter :: (a -> <e> b) -> T a -> <Proc,e> ()
22 iterI :: (Integer -> a -> <e> b) -> T a -> <Proc,e> ()
33 iterB :: (a -> <e> Boolean) -> T a -> <Proc,e> Boolean
44 filter :: (a -> <e> Boolean) -> T a -> <Proc,e> ()
57 mapFirst :: (a -> <e> Maybe b) -> T a -> <Proc,e> Maybe b
58 mapFirst f it = loop ()
62 then match f (next it) with
68 fold :: (a -> b -> <e> a) -> a -> T b -> <Proc,e> a
69 fold f init it = loop init
73 then loop (f cur (next it))
76 importJava "java.lang.Iterable" where
79 iterator :: Iterable a -> <Proc> T a