fptools.native

Undocumented in source.

Members

Functions

all
bool all(bool delegate(T) p, T[] list)

all - Usage: all(x => x%2 == 0, [2, 4, 6]) == true

any
bool any(bool delegate(T) p, T[] list)

any - Usage: any(x => x%2 == 0, [2, 5, 7]) == true

drop
T[] drop(int n, T[] list)

drop - Usage : drop(3, seq(1,5)) == [4,5]

dropWhile
T[] dropWhile(bool delegate(T) p, T[] list)

dropWhile - Usage : dropWhile!int(x => x < 3, seq(1,5)) == [3,4,5]

filter
T[] filter(bool delegate(T) p, T[] list)

filter - Usage : filter!int(x => x%2 == 0, seq(1,10)) == [2,4,6,8,10]

map
T[] map(T delegate(T) f, T[] list)

map - Usage : map!int(x => x + 3, seq(1,4)) == [4, 5, 6, 7]

reduce
T reduce(T delegate(T, T) op, T[] list)

reduce

take
T[] take(int n, T[] list)

take - Usage : take(3, [1,2,3,4,5]) == [1,2,3]

takeWhile
T[] takeWhile(bool delegate(T) p, T[] list)

takeWhile - Usage : takeWhile!int(x => x < 3, seq(1,10)) == [1,2]

zipWith
T[] zipWith(T delegate(T, T) op, T[] t1, T[] t2)

zipWith - Usage: zipWith((x, y) => x + y, [1,2], [3,4]) == [4, 6]

Meta