f::scanl1 (public)

 f::scanl1 f xs

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

Takes a binary function f and a list {x1 x2 x3 ...} and returns {x1 (f x1 x2) (f (f x1 x2) x3) ...}. "scanl1" behaves like "scanl", but does not take a start element and does not work for empty lists. Examples: scanl1 min [list 3 1 4 1 5 9 2 6] = {3 1 1 1 1 1 1 1} scanl1 max [list 3 1 4 1 5 9 2 6] = {3 3 4 4 5 9 9 9}

Parameters:
f (required)
xs (required)
See Also:
  • scanl

Partial Call Graph (max 5 caller/called nodes):
%3 test_functional_api functional_api (test acs-tcl) f::scanl1 f::scanl1 test_functional_api->f::scanl1 f::head f::head (public) f::scanl1->f::head f::null_p f::null_p (public) f::scanl1->f::null_p f::scanl f::scanl (public) f::scanl1->f::scanl f::tail f::tail (public) f::scanl1->f::tail

Testcases:
functional_api
[ show source ]
Show another procedure: