f::take_until (public)

 f::take_until p xs

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

Parameters:
p (required)
xs (required)
Returns:
the list of elements up to and including the first element of xs which satisfies p

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