USING: kernel sequences locals ; IN: my-sequences ! Not safe. Must not be called with the empty sequence :: (my-binary-reduce) ( seq quot -- val ) seq length 1 = [ seq first ] [ seq halves [ quot (my-binary-reduce) ] bi@ quot call ] if ; inline recursive : my-binary-reduce ( seq id quot -- val ) swapd over length 0 = [ 2drop ] [ [ (my-binary-reduce) ] keep call ] if ; inline