Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lang racket
- ;;;;;;;;;;
- ;; 1.34 ;;
- ;;;;;;;;;;
- (define (f g)
- (g 2))
- (f sqr)
- ;; 4
- (f (lambda (z) (* z (add1 z))))
- ;; 6
- ;; (f f) reduces to (f 2) which reduces to (2 2) which produces an error because 2
- ;; is not a procedure.
- ;; (f f)
- ;; application: not a procedure;
- ;; expected a procedure that can be applied to arguments
- ;; given: 2
- ;; arguments...:
- ;; 2
- ;; context...:
- ;; C:\Program Files\Racket\collects\racket\private\misc.rkt:87:7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement