Metaprogramming: Difference between revisions
Content deleted Content added
Line 68:
} ifelse
end}.
</lang>
The standard if expression in postscript does not take a predicate. Instead it acts on the boolean value on top of the stack. This newly created word allows us to do
<lang postscript>
>| 2 {1 gt} {=} ift
2
</lang>
Instead of
<lang postscript>
>| 2 dup 1 gt {=} ift
2
</lang>
|