f::iterate (public)
f::iterate n f x
Defined in packages/acs-tcl/tcl/ad-functional-procs.tcl
Examples: f::iterate 10 [f::lambda {x} {expr $x+1}] 5 = {5 6 7 8 9 10 11 12 13 14} f::iterate 10 [f::lambda {x} {expr $x*2}] 1 = {1 2 4 8 16 32 64 128 256 512} f::iterate 4 f::tail {1 2 3 4 5} = {{1 2 3 4 5} {2 3 4 5} {3 4 5} {4 5}}
- Parameters:
- n (required)
- f (required)
- x (required)
- Returns:
- \{x (f x) (f (f x) (f (f (f x))) ...\}\}.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- functional_api