list-take

l count


Summary

Take the first COUNT elements from list L

Bytecode

Probably only interesting to you if you want to understand more about the Nujel VM or care very much about performance.

(    0 ($get/val 'count))
(    2 ($push/int/byte 0))
(    4 ($<=))
(    5 ($jf* 7))
(    8 ($push/nil))
(    9 ($jmp* 19))
(   12 ($get/val 'l))
(   14 ($car))
(   15 ($get/val 'list-take))
(   17 ($get/val 'l))
(   19 ($cdr))
(   20 ($get/val 'count))
(   22 ($push/int/byte 1))
(   24 ($sub))
(   25 ($apply 2))
(   27 ($cons))
(   28 ($ret))