2 ms·
>>start to use (in Haskell) "flip", "uncurry This I think lines up with the general Forth advice to avoid stack juggling (swap, roll, over, dup etc).
by Avshalom 4y ago
>>start to use (in Haskell) "flip", "uncurry
This I think lines up with the general Forth advice to avoid stack juggling (swap, roll, over, dup etc).
- zozbot234 4y agoSure, but some amount of stack juggling is unavoidable once you allow for multiple arguments/return values. It's a rare case when function arguments simply map "naturally" to the top values on the stack.
- thesz 4y agoJoy allows to return a concatenation on top of stack. That's a single element that can contain several elements, just like tuple in Haskell.