Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #lang racket
- ;;;;;;;;;;
- ;; 4.14 ;;
- ;;;;;;;;;;
- ;; Installing map as a primitive procedure does not work because map expects its
- ;; first argument to be a Racket procedure, and not one of our M-language procedures,
- ;; which is a procedure wrapped in a tagged list.
- ;; For example, after putting map and + in the primitive procedures list:
- ;; (driver-loop)
- ;; ;;; M-Eval input:
- ;; (+ 1 2)
- ;; ;;; M-Eval value:
- ;; 3
- ;; ;;; M-Eval input:
- ;; (map + (list 1 2) (list 3 4))
- ;; . . map: contract violation
- ;; expected: procedure?
- ;; given: '(primitive #<procedure:+>)
- ;; argument position: 1st
- ;; other arguments...:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement