Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- define function make-linear-mapper
- (times :: <integer>, plus :: <integer>)
- => (mapper :: <function>)
- method (x)
- times * x + plus;
- end method;
- end function;
- define constant times-two-plus-one = make-linear-mapper(2, 1);
- times-two-plus-one(5);
- // Returns 11.
Add Comment
Please, Sign In to add comment