Modules index

# Functional

This module provides means for programming in a functional style.

`func map(func_, c):` Create a new list with the results of successively applying `func_` to each element in `c`.

`func foldl(func_, c, initializer := null):` Uses `func_` to reduce `c` to a single value. `func_` must take two arguments and return a single value. If initializer is `null`, first applies `func_(c[0], c[1])` using the return value `a` to apply `func_(a, c[2])` and so on. If initializer is not `null`, first applies `func_(a, c[0])` using the return value `a'` to apply `func_(a', c[1])` and so on.

cvd_to_html ©2006-2007 Laurence Tratt