kth-object ( seq k quot: ( x y -- ? ) -- elt ) (original) (raw)
kth-object ( seq k quot: ( x y -- ? ) -- elt )
Vocabulary
math.statistics
Inputs
seq | an object |
---|---|
k | an object |
quot | a quotation with stack effect ( x y -- ? ) |
Outputs
elt | an object |
---|
Definition
USING: kernel math.statistics.private sequences ;
: kth-object ( seq k quot: ( x y -- ? ) -- elt )
[ [ nth ] [ exchange ] ] dip (kth-object) ; inline