Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Function-composition/PostScript/function-composition.ps
Normal file
12
Task/Function-composition/PostScript/function-composition.ps
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
/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
|
||||
|
||||
/square { dup mul } def
|
||||
/plus1 { 1 add } def
|
||||
/sqPlus1 /square load /plus1 load compose def
|
||||
Loading…
Add table
Add a link
Reference in a new issue