list.ml

A simple linked list implementation.

Definitions

Types

data List a
	= Cons a (List a)
	| Nil

The default list type generated
by [...]

Creating lists

range : Number -> Number -> List Number
srange : Number -> Number -> Number -> List Number

start, end, step

Accessors

tail : List a -> List a
tailSafe : List a -> List a
head : List a -> a
len : List a -> Number
listAtSafe : Number -> List a -> Maybe a
listAt : Number -> List a -> a
take : Number -> List a -> List a
chunksOf : Number -> List a -> List (List a)
contains : a -> List a -> Bool

Sorting, etc.

sort : List a -> List a
nub : List a -> List a

Manipulating lists

append : a -> List a -> List a
foldr : (b -> a -> b) -> b -> List a -> b
extend : List a -> List a -> List a
concat : List (List a) -> List a
filter : (a -> Bool) -> List a -> List a
reverse : List a -> List a
map : (a -> b) -> (List a) -> List b
foreach2D : Number -> Number -> (Number->Number-> Unit) -> Unit
imap : (Number -> a -> b) -> List a -> List b
any : List Bool -> Bool
zip : List a -> List b -> List (a,b)