Created
March 8, 2022 18:06
-
-
Save shirok/f14faafb9a016c82ac422806bc0bcaca to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gosh> (define-method object-+ ((f <procedure>) (g <procedure>)) (lambda (x) (+ (f x) (g x)))) | |
#<generic object-+ (1)> | |
gosh> (define (f x) (* x 2)) | |
f | |
gosh> (define (g x) (* x 3)) | |
g | |
gosh> ((+ f g) 4) | |
20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment