Module MList

This module is undocumented. This is a list of its definitions.

add :: MList.T a -> a -> <Proc> ()
addAll :: MList.T a -> [a] -> <Proc> ()
clear :: MList.T a -> <Proc> ()
contains :: MList.T a -> a -> <Proc> Boolean
create :: () -> <Proc> MList.T a
createC :: Integer -> <Proc> MList.T a
first :: MList.T a -> <Proc> a

Returns the first element of a list

fold :: (a -> b -> <c> a) -> a -> MList.T b -> <Proc,c> a
freeze :: MList.T a -> <Proc> [a]

Converts the mutable list into an immutable one without copying the underlying data. This only changes how the structure is treated by the SCL type system; it is an O(1) operation, not a copy. The original mutable list must not be used anymore after this.

fromList :: [a] -> <Proc> MList.T a
get :: MList.T a -> Integer -> <Proc> a
isEmpty :: MList.T a -> <Proc> Boolean
iter :: (a -> <b> ()) -> MList.T a -> <b,Proc> ()
iterB :: (a -> <b> Boolean) -> MList.T a -> <b,Proc> Boolean
last :: MList.T a -> <Proc> a

Returns the last element of a list

remove :: MList.T a -> Integer -> <Proc> a
removeLast :: MList.T a -> <Proc> Maybe a
set :: MList.T a -> Integer -> a -> <Proc> Maybe a
singleton :: a -> <Proc> MList.T a
size :: MList.T a -> <Proc> Integer
toList :: MList.T a -> <Proc> [a]

Creates an independent copy of the list as an immutable list. Unlike freeze, this does not invalidate the original mutable list, which can still be used afterwards.