length

α


Summary

Returns the length of collection α

Bytecode

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

(    0 ($let))
(    1 ($get/val 'type-of))
(    3 ($get/val ))
(    5 ($apply 1))
(    7 ($det/val 'ΓεnΣym-4))
(    9 ($drop))
(   10 ($get/val 'ΓεnΣym-4))
(   12 ($push/val :nil))
(   14 ($=))
(   15 ($jf* 8))
(   18 ($push/int/byte 0))
(   20 ($jmp* 116))
(   23 ($get/val 'ΓεnΣym-4))
(   25 ($push/val :pair))
(   27 ($=))
(   28 ($jf* 12))
(   31 ($get/val 'list/length))
(   33 ($get/val ))
(   35 ($apply 1))
(   37 ($jmp* 99))
(   40 ($get/val 'ΓεnΣym-4))
(   42 ($push/val :array))
(   44 ($=))
(   45 ($jf* 12))
(   48 ($get/val 'array/length))
(   50 ($get/val ))
(   52 ($apply 1))
(   54 ($jmp* 82))
(   57 ($get/val 'ΓεnΣym-4))
(   59 ($push/val :tree))
(   61 ($=))
(   62 ($jf* 12))
(   65 ($get/val 'tree/size))
(   67 ($get/val ))
(   69 ($apply 1))
(   71 ($jmp* 65))
(   74 ($get/val 'ΓεnΣym-4))
(   76 ($push/val :buffer))
(   78 ($=))
(   79 ($dup))
(   80 ($jt* 26))
(   83 ($drop))
(   84 ($get/val 'ΓεnΣym-4))
(   86 ($push/val :string))
(   88 ($=))
(   89 ($dup))
(   90 ($jt* 16))
(   93 ($drop))
(   94 ($get/val 'ΓεnΣym-4))
(   96 ($push/val :buffer-view))
(   98 ($=))
(   99 ($dup))
(  100 ($jt* 6))
(  103 ($drop))
(  104 ($push/val #f))
(  106 ($jf* 12))
(  109 ($get/val 'buffer/length))
(  111 ($get/val ))
(  113 ($apply 1))
(  115 ($jmp* 21))
(  118 ($get/val 'throw))
(  120 ($get/val 'list))
(  122 ($push/val :type-error))
(  124 ($push/val You can only use length with a collection))
(  126 ($get/val ))
(  128 ($get/val 'current-lambda))
(  130 ($apply 0))
(  132 ($apply 4))
(  134 ($apply 1))
(  136 ($closure/pop))
(  137 ($ret))