2 importJava "java.util.Iterator" where
5 hasNext :: Iterator a -> <Proc> Boolean
6 next :: Iterator a -> <Proc> a
9 iter :: (a -> <e> dummy) -> Iterator a -> <Proc,e> ()
20 find :: (a -> <e> Boolean) -> Iterator a -> <Proc,e> Maybe a
32 any :: (a -> <e> Boolean) -> Iterator a -> <Proc,e> Boolean
43 all :: (a -> <e> Boolean) -> Iterator a -> <Proc,e> Boolean
54 mapFirst :: (a -> <e> Maybe b) -> Iterator a -> <Proc,e> Maybe b
55 mapFirst f it = loop ()
59 then match f (next it) with
65 foldl :: (a -> b -> <e> a) -> a -> Iterator b -> <Proc,e> a
66 foldl f init it = loop init
70 then loop (f cur (next it))
74 foldl1 :: (a -> a -> <e> a) -> Iterator a -> <Proc,e> a
75 foldl1 f it = foldl f (next it) it