f::filter (public)

 f::filter pred xs

Defined in packages/acs-tcl/tcl/ad-functional-procs.tcl

Examples: f::filter f::even_p {3 1 4 1 5 9 2 6} = {4 2 6} f::filter [f::lambda {x} {expr $x>500}] {317 826 912 318} = {826 912}

Parameters:
pred (required)
xs (required)
Returns:
all elements of the list 'xs' that fulfill the predicate 'pred'.

Partial Call Graph (max 5 caller/called nodes):
%3 test_functional_api functional_api (test acs-tcl) f::filter f::filter test_functional_api->f::filter

Testcases:
functional_api
[ show source ]
Show another procedure: