Welcome to Racket v7.2. > (c 0) # > (c 5) # > (printn (c 5)) 5 > (printn (c 50)) 50 > (printn (c 5000)) 5000 > (printn (cs (c 5))) 6 > (printn (cs' (c 5))) ; application: not a procedure; ; expected a procedure that can be applied to arguments ; given: (c 5) ; [,bt for context] > cs' (lambda (n) (lambda (f) (lambda (x) ((n f) (f x))))) > (printn (cs1 (c 5))) 6 > (printn c0) 0 > (printn (cs c0)) 1 > (printn ((c+ c3) c5)) 8 > (printn ((c+ (c 310)) (c 690))) 1000 > (printn ((c* c3) c5)) 15 > (printn ((c* (c 11)) (c 12))) 132 > (printn ((c*1 (c 11)) (c 12))) # > (printn ((c*1 (c 11)) (c 12))) 132 > (printn ((c+2 (c 310)) (c 690))) 1000 > (printn ((cexp c3) c5)) 243 > (printn ((cexp c5) c3)) 125 > (printn ((cexp1 c5) c3)) 125 > (printn (c5 c3)) 243 > (printn ((ctrue c3) c5)) 3 > (printbool ctrue) #t > (printbool (cneg ctrue)) #f > (printbool (cneg1 ctrue)) #f > (printbool ((cand ctrue) cfalse)) #f > (printbool ((cand ctrue) ctrue)) #t > (printbool ((cand cfalse) ctrue)) #f > (printbool ((cor cfalse) ctrue)) #t > (printbool ((cor cfalse) cfalse)) #f > (printbool ((cor ctrue) cfalse)) #t > (printbool ((cor ctrue) ctrue)) #t > (printbool (c=0 c0)) #t > (printbool (c=0 c1)) #f > (printbool (c=0 c5)) #f > (printbool (c/2 c5)) #f > (printbool (c/2 c3)) #f > (printbool (c/2 ((c+ c3) c5))) #t > (printpairn ((ccons c3) c5)) (# . #) > (printpairn ((ccons c3) c5)) (3 . 5) > (cons 3 5) (3 . 5) > (printn (cl ((ccons c3) c5))) 3 > (printn (cr ((ccons c3) c5))) 5 > (printn (cp c5)) 4 > (printn (cp (c 1000))) 999 > (printn (c! c3)) ; cons: arity mismatch; ; the expected number of arguments does not match the given number ; expected: 2 ; given: 1 ; [,bt for context] > (printn (c! c3)) 6 > (printn (c! c5)) 120 > (printn (c! (c 10))) 3628800 >