array/reduce

arr fun α


Summary

Reduce an array, (reduce) should be preferred

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 'array/length))
(    2 ($get/val 'arr))
(    4 ($apply 1))
(    6 ($det/val 'len))
(    8 ($drop))
(    9 ($let))
(   10 ($push/int/byte 0))
(   12 ($det/val 'i))
(   14 ($drop))
(   15 ($push/nil))
(   16 ($jmp* 26))
(   19 ($drop))
(   20 ($get/val 'fun))
(   22 ($get/val ))
(   24 ($get/val 'array/ref))
(   26 ($get/val 'arr))
(   28 ($get/val 'i))
(   30 ($apply 2))
(   32 ($apply 2))
(   34 ($set/val ))
(   36 ($drop))
(   37 ($get/val 'i))
(   39 ($inc/int))
(   40 ($set/val 'i))
(   42 ($get/val 'i))
(   44 ($get/val 'len))
(   46 ($<))
(   47 ($jt* -28))
(   50 ($drop))
(   51 ($get/val ))
(   53 ($closure/pop))
(   54 ($ret))