f::take_while (public)

 f::take_while p xs

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

Parameters:
p (required)
xs (required)
Returns:
the longest initial segment of xs whose elements satisfy p

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

Testcases:
functional_api
Source code:
    lmap x $xs {
        if { ![$p $x] } { break }
        set x
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: