Module ra_lol

Data Types

cont()

abstract datatype: cont()

gt_fun()

gt_fun() = fun((Item, Item) -> boolean())

state()

abstract datatype: state()

Function Index

append/2append an item that is greater than the last appended item.
foldl/3Fold left-to-right (from newest/largest to oldest/smallest).
foldr/3Fold right-to-left (from oldest/smallest to newest/largest).
from_list/1initialise from a list sorted in descending order.
from_list/2
len/1
new/0
new/1
search/2
takewhile/2
to_list/1

Function Details

append/2

append(Item, X2::state()) -> state() | out_of_order

append an item that is greater than the last appended item

foldl/3

foldl(Fun::fun((Item, Acc) -> Acc), Acc, X3::state()) -> Acc

Fold left-to-right (from newest/largest to oldest/smallest). Since the structure stores items in descending order (newest first), this iterates from the beginning to the end.

foldr/3

foldr(Fun::fun((Item, Acc) -> Acc), Acc, X3::state()) -> Acc

Fold right-to-left (from oldest/smallest to newest/largest). Since the structure stores items in descending order (newest first), this iterates from the end to the beginning.

from_list/1

from_list(List::list()) -> state()

initialise from a list sorted in descending order

from_list/2

from_list(GtFun::gt_fun(), List::list()) -> state()

len/1

len(X1::state()) -> non_neg_integer()

new/0

new() -> state()

new/1

new(GtFun::gt_fun()) -> state()

search/2

search(SearchFun::fun((term()) -> higher | lower | equal), Cont::state() | cont()) -> {term(), cont()} | undefined

takewhile/2

takewhile(Fun::fun((Item) -> boolean()), X2::state()) -> {[Item], state()}

to_list/1

to_list(X1::state()) -> list()


Generated by EDoc