ATS2FUNCRASH/mylib


int_foreach

Interface

Waiting...

Implementation

Waiting...

Description

Given an integer n0 and a closure-function fwork, this function applies fwork to the integers between 0 and n0-1, inclusive.

int_foreach_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("int_foreach") for supporting dot-notation.

int_foldleft

Interface

Waiting...

Implementation

Waiting...

Description

This function essentially treats its first argument n0 as the list of integers between 0 and n0-1, inclusive and then performs left list-folding.

int_foldleft_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("int_foldleft") for supporting dot-notation.

int_cross_foreach

Interface

Waiting...

Implementation

Waiting...

Description

Given two integers m and n and a closure-function fwork, this function applies fwork in the row-major fashion to all the pairs (i, j) such that i ranges between 0 and m-1, inclusive, and j between 0 and n-1, inclusive.

int_cross_foreach_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of #dyncode("int_cross_foreach") for supporting dot-notation.

list0_is_nil

Interface

Waiting...

Implementation

Waiting...

Description

This function tests whether a given list0-value is empty.

list0_is_cons

Interface

Waiting...

Implementation

Waiting...

Description

This function tests whether a given list0-value is non-empty.

list0_length

Interface

Waiting...

Implementation

Waiting...

Description

This function computes the length of a given list0-value.

list0_head_exn

Interface

Waiting...

Implementation

Waiting...

Description

This function returns the head of a given list0-value xs if xs is non-empty or terminates abnormally due to pattern matching failure.

list0_tail_exn

Interface

Waiting...

Implementation

Waiting...

Description

This function returns the tail of a given list0-value xs if xs is non-empty or terminates abnormally due to pattern matching failure.

list0_drop_exn

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and an integer n, this function returns the suffix of xs starting from element n (i.e., xs[n]). If n is negative, it is treated as 0. In the case where n is greater than length(xs), the function terminates abnormally due to pattern matching failure.

list0_take_exn

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and an integer n, this function returns the prefix of xs consisting of the first n elements. If n is negative, it is treated as 0. In the case where n is greater than length(xs), the function terminates abnormally due to pattern matching failure.

list0_get_at_exn

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and an integer n, this function returns xs[n] if it is defined or raises ##dyncode(ListSubscriptExn).

list0_append

Interface

Waiting...

Implementation

Waiting...

Description

Given two list0-values xs and ys, this function returns another list0-value that is the concatenation of xs and ys.

list0_concat

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xss in which each element is also a list0-value, this function returns another list0-value that is formed by concatenating all of the elements in xss.

list0_reverse

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs, this function returns another list0-value ys that is the reverse of xs.

list0_revappend

Interface

Waiting...

Implementation

Waiting...

Description

Given two list0-values xs and ys, this function returns another list0-value that is the concatenation of the reverse of xs and ys.

list0_map

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and a closure-function f, this function returns another list0-value consisting of f(xs[0]), ..., f(xs[n-1]), where n is the length of xs. The implementation of this function in ATSLIB is tail-recursive.

list0_map_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of #dyncode("list0_map") for supporting dot-notation.

list0_imap

Interface

Waiting...

Implementation

Waiting...

Description

This function is the standard indexed version of ##dyncode("list0_map").

list0_imap_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_imap") for supporting dot-notation.

list0_mapopt

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and a closure-function f, this function returns another list0-value consisting of the join of the option values f(xs[0]), ..., f(xs[n-1]), where n is the length of xs. The implementation of this function in ATSLIB is tail-recursive.

list0_mapopt_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_mapopt") for supporting dot-notation.

list0_mapjoin

Interface

Waiting...

Implementation

Waiting...

Description

This function applies ##dyncode("list0_map") to generate a list0-value yss in which each element is also a list0-value and then applies ##dyncode("list0_concat") to flatten yss.

list0_mapjoin_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_mapjoin") for supporting dot-notation.

int_list0_map

Interface

Waiting...

Implementation

Waiting...

Description

Given an integer n and a closure-function f, this function returns a list0-value consisting of f(i) where i ranges between 0 and n-1, inclusive.

int_list0_mapopt

Interface

Waiting...

Implementation

Waiting...

Description

Given an integer n and a closure-function f, this function returns a list0-value obtained from joining the option0-values f(i) where i ranges between 0 and n-1, inclusive. The actual implementation of this function in ATSLIB is tail-recursive.

int_cross_list0_map

Interface

Waiting...

Implementation

Waiting...

Description

Given two integers m and n and a closure-function f, this function returns a list0-value consisting of f(i,j) enumerated in the row-major fashion for i ranging between 0 and m-1 and j between 0 and n-1.

list0_foreach

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and a closure-function fwork, this function traverses xs from left to right, applying fwork to each encountered element.

list0_foreach_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_foreach") for supporting dot-notation.

list0_iforeach

Interface

Waiting...

Implementation

Waiting...

Description

This function is the standard indexed version of ##dyncode("list0_foreach").

list0_iforeach_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_iforeach") for supporting dot-notation.

list0_forall

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and a predicate, this function returns true if and only if every element in xs satisfies the predicate.

list0_exists

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and a predicate, this function returns true if and only if there exists in xs one element satisfying the predicate.

list0_find_index

Interface

Waiting...

Implementation

Waiting...

Description

Given a list0-value xs and a predicate, this function returns the position of the first element in xs that satisfies the predicate or -1 if there exists no element as such.

list0_forall_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_forall") for supporting dot-notation.

list0_exists_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("list0_exists") for supporting dot-notation.

list0_foldleft

Interface

Waiting...

Implementation

Waiting...

Description

This function performs so-called left list-folding: Given a list xs, an initial value r0, and a closure-function fopr, it returns r0 if xs is empty or it applies fopr to r0 and xs[0] to generate a new value to be used for processing the tail of xs.

list0_ifoldleft

Interface

Waiting...

Implementation

Waiting...

Description

This function is the standard indexed version of ##dyncode("list0_foldleft").

list0_foldright

Interface

Waiting...

Implementation

Waiting...

Description

This function performs so-called right list-folding on a given list, which is essentially left list-folding on the reverse of the list.

int_stream_from

Interface

Waiting...

Implementation

Waiting...

Description

Given an integer n, this function returns the stream of integers n, n+1, n+2, etc.

stream_make_list0

Interface

Waiting...

Implementation

Waiting...

Description

This function turns a given list0-value into the corresponding stream-value.

stream_takeLte

Interface

Waiting...

Implementation

Waiting...

Description

Given a stream-value xs and an integer n, this function returns another stream-value consisting of the first n elements in xs if xs contains so many elements or all of the elements in xs otherwise.

stream_get_at_exn

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_get_at_exn") on streams.

stream_append

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_append") on streams.

stream_concat

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_concat") on streams.

stream_map

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_map") on streams.

stream_imap

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_imap") on streams.

stream_filter

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_filter") on streams.

stream_foreach

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_foreach") on streams.

stream_foreach_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("stream_foreach") for supporting dot-notation.

stream_iforeach

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_iforeach") on streams.

stream_iforeach_method

Interface

Waiting...

Implementation

Waiting...

Description

This function is a curried version of ##dyncode("stream_iforeach") for supporting dot-notation.

stream_foldleft

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_foldleft") on streams.

int_stream_vt_from

Interface

Waiting...

Implementation

Waiting...

Description

Given an integer n, this function returns the linear stream of integers n, n+1, n+2, etc.

stream_vt_append

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_append") on linear streams.

stream_vt_concat

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_concat") on linear streams.

stream_vt_takeLte

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_takeLte") on linear streams.

stream_vt_map

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_map") on linear streams.

stream_vt_foldleft

Interface

Waiting...

Implementation

Waiting...

Description

This function is the corresponding version of ##dyncode("list0_foldleft") on linear streams.