Re:Math.min(Math.max(num, min), max)
by cjallen88 on Friday August 21, 2020 @04:53AM
(#24233254)
For casual readers,
`dip` pops the top of the stack, executes a quotation, then pushes the top of the stack back on.
So this pops the max value off the stack, applies the quoted `max` word to the x and min stack values, then pops the max value back on the stack and applies the `min` word to the result and the max.
So this pops the max value off the stack, applies the quoted `max` word to the x and min stack values, then pops the max value back on the stack and applies the `min` word to the result and the max.