RosettaCodeData/Task/Function-composition/PostScript/function-composition.ps
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

7 lines
228 B
PostScript

/square { dup mul } def
/plus1 { 1 add } def
/sqPlus1{ square plus1 } def
% if the task really demands we make a function called "compose", well
/compose { def } def % so now we can say:
/sqPlus1 { square plus1 } compose