2017-09-23 10:01:46 +02:00
|
|
|
/compose { % f g -> { g f }
|
|
|
|
|
[ 3 1 roll exch
|
|
|
|
|
% procedures are not executed when encountered directly
|
|
|
|
|
% insert an 'exec' after procedures, but not after operators
|
|
|
|
|
1 index type /operatortype ne { /exec cvx exch } if
|
|
|
|
|
dup type /operatortype ne { /exec cvx } if
|
|
|
|
|
] cvx
|
|
|
|
|
} def
|
|
|
|
|
|
2013-04-10 22:43:41 -07:00
|
|
|
/square { dup mul } def
|
|
|
|
|
/plus1 { 1 add } def
|
2017-09-23 10:01:46 +02:00
|
|
|
/sqPlus1 /square load /plus1 load compose def
|