This works by building a little [while] program and running it: 1 3 [++] • [-- dip] cons [swap] infra [0 >] swap while pop
1 3 [++] [-- dip] • cons [swap] infra [0 >] swap while pop
1 3 [[++] -- dip] • [swap] infra [0 >] swap while pop
1 3 [[++] -- dip] [swap] • infra [0 >] swap while pop dip -- [++] • swap [3 1] swaack [0 >] swap while pop
dip [++] -- • [3 1] swaack [0 >] swap while pop
dip [++] -- [3 1] • swaack [0 >] swap while pop
1 3 [-- [++] dip] • [0 >] swap while pop
1 3 [-- [++] dip] [0 >] • swap while pop 1 3 [0 >] [-- [++] dip] • while pop This is a common pattern in Joy. You accept some parameters from the stack which typically include qouted programs and use them to build another program which does the actual work. This is kind of like macros in Lisp, or preprocessor directives in C.