Guest User

Untitled

a guest
Jul 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. define function make-linear-mapper
  2. (times :: <integer>, plus :: <integer>)
  3. => (mapper :: <function>)
  4. method (x)
  5. times * x + plus;
  6. end method;
  7. end function;
  8.  
  9. define constant times-two-plus-one = make-linear-mapper(2, 1);
  10.  
  11. times-two-plus-one(5);
  12. // Returns 11.
Add Comment
Please, Sign In to add comment