Header menu logo fantomas

List Module

Functions and values

Function or value Description

chooseState f state l

Full Usage: chooseState f state l

Parameters:
    f : 'a -> 'b -> 'a * 'c option
    state : 'a
    l : 'b list

Returns: 'c list
f : 'a -> 'b -> 'a * 'c option
state : 'a
l : 'b list
Returns: 'c list

cutOffLast arg1

Full Usage: cutOffLast arg1

Parameters:
    arg0 : 'a list

Returns: 'a list

Removes the last element of a list

arg0 : 'a list
Returns: 'a list

foldWithLast f g initialState items

Full Usage: foldWithLast f g initialState items

Parameters:
    f : 'state -> 'item -> 'state
    g : 'state -> 'item -> 'state
    initialState : 'state
    items : 'item list

Returns: 'state

Similar to a List.fold but pass in another fold function for when the last item is reached.

f : 'state -> 'item -> 'state
g : 'state -> 'item -> 'state
initialState : 'state
items : 'item list
Returns: 'state

isNotEmpty l

Full Usage: isNotEmpty l

Parameters:
    l : 'a list

Returns: bool
l : 'a list
Returns: bool

mapWithLast f g xs

Full Usage: mapWithLast f g xs

Parameters:
    f : 'a -> 'b
    g : 'a -> 'b
    xs : 'a list

Returns: 'b list
f : 'a -> 'b
g : 'a -> 'b
xs : 'a list
Returns: 'b list

moreThanOne

Full Usage: moreThanOne

Returns: 'a list -> bool
Returns: 'a list -> bool

partitionWhile f xs

Full Usage: partitionWhile f xs

Parameters:
    f : int -> 'a -> bool
    xs : 'a list

Returns: 'a list * 'a list
f : int -> 'a -> bool
xs : 'a list
Returns: 'a list * 'a list

Type something to start searching.