JanetDocsSourcePlaygroundI'm feeling luckyCommunityGitHub sign in

take

core-api


    function
    boot.janet on line 1179, column 1

    (take n ind)

    Take the first n elements of a fiber, indexed or bytes type. 
    Returns a new array, tuple or string, respectively. If `n` is 
    negative, takes the last `n` elements instead.


See also:first1 exampleSign in to add an example
Loading...
(take 2 [1 -2 2 3 9 -10])  # (1 -2)
btbytesPlayground