size :: T a -> <Proc> Integer
isEmpty :: T a -> <Proc> Boolean
get :: T a -> Integer -> <Proc> a
+ set :: T a -> Integer -> a -> <Proc> Maybe a
add :: T a -> a -> <Proc> ()
addAll :: T a -> [a] -> <Proc> ()
then Nothing
else Just (remove l (Java.isub (size l) 1))
+"Returns the first element of a list"
+@inline
+first :: T a -> <Proc> a
+first s = get s 0
+
+"Returns the last element of a list"
+@inline
+last :: T a -> <Proc> a
+last s = get s (Java.isub (size s) 1)
+
@inline
iter :: (a -> <e> ()) -> T a -> <e,Proc> ()
iter f s = Iterator.iter f (iterator s)