> (sum 1 5 square 1+) 55 > (p 5 2) 120 > (p 5 2) 120 > (p 5 2) 42 > (p 5 2) 321 > (p 5 2) 120 > (fact 5) 120 > (fact 100) 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 > (fact 100) 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 > (pow 2 5) [image] [image] application: not a procedure; expected a procedure that can be applied to arguments given: 2 > (pow 2 5) 32 > (pow 2 64) 18446744073709551616 > (myexp 1 10) 9864101/3628800 > (myexp 1 10) 2.7182818011463845 > (exp 1) 2.718281828459045 > (myexp 1 10) 9864101/3628800 > (myexp 1 10) 2.7182818011463845 > (exp 1) 2.718281828459045 > (myexp 1 10) 2.7182818011463845 > (exp 1) 2.718281828459045 > (e [image] or: bad syntax in: or > (or) #f > (exists? 1 10 odd?) [image] [image] labmda: undefined; cannot reference an identifier before its definition > (exists? 1 10 odd?) #t > (exists? 1 10 zero?) #f > (prime? 2) #t > (prime? 3) #t > (prime? 4 ) #f > (prime? 42) #f > (prime? 41) #t > (prime? 1) #t > (prime? 1) #f > (fact 50) [image] [image] defnie: undefined; cannot reference an identifier before its definition > (2* 2) 4.009999999999891 > (2* 2) 4.000010000027032 > (repeated 5+ 3) [image] [image] 5+: undefined; cannot reference an identifier before its definition > (repeated 5+ 3) # > ((repeated 5+ 3) 2) 17 > (repeated 5+ 3) # > ((repeated 5+ 3) 2) 17 > (repeated 5+ 3) # > ((repeated 5+ 3) 2) [image] [image] application: not a procedure; expected a procedure that can be applied to arguments given: 8 > ((repeated 5+ 3) 2) 17 > (derive-n (lambda (x) (* x x x)) 2 0.001) # > ((derive-n (lambda (x) (* x x x)) 2 0.001) 3) 18.006000004788802 > ((derive-n exp 10 0.001) 1) -3996802888650563.5 > ((derive-n exp 2 0.001) 1) 2.721001696848191 > ((derive-n exp 3 0.001) 1) 2.7223623355610016 > ((derive-n exp 3 0.000001) 1) 0.0 > ((derive-n exp 3 0.0001) 1) 2.7187141427020833 > ((derive-n sin 2 0.0001) 10) 0.5441050054955099 > (sin 10) -0.5440211108893698 > ((derive-n sin 4 0.0001) 10) -4.440892098500626 > ((derive-n sin 4 0.001) 10) -0.545785638905727 > ((derive-n sin 2 0.0001) 10) [image] [image] derive: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 1 > ((derive-n sin 2 0.0001) 10) # > ((derive-n sin 2 0.0001) 10) # > ((derive-n sin 2 0.0001) 10) 0.5441050054955099 > ((derive-n sin 2 0.0001) 10) [image] [image] +: contract violation expected: number? given: # argument position: 1st > ((derive-n sin 2 0.0001) 10) 0.5441050054955099 [image] define: bad syntax in: #t > (lambda-if my-#t (+ 3 5) (- 5 2)) 8 > (lambda-if my-#f (+ 3 5) (- 5 2)) 3 > (lambda-if my-#t (+ 3 5) (/ 5 0)) [image] [image] /: division by zero > (lambda-if my-#t (+ 3 5) (- 5 2)) [image] [image] my-#t: arity mismatch; the expected number of arguments does not match the given number expected: 0 given: 2 > (lambda-if my-#t (+ 3 5) (- 5 2)) 8 > (lambda-if my-#f (+ 3 5) (- 5 2)) 3 > (lambda-if my-#t (+ 3 5) (/ 5 0)) [image] [image] /: division by zero > (lambda-if my-#t (+ 3 5) (/ 5 0)) [image] [image] /: division by zero > (lambda-if my-#t (lambda () (+ 3 5)) (lambda () (/ 5 0))) # > (lambda-if my-#t (lambda () (+ 3 5)) (lambda () (/ 5 0))) > ((lambda-if my-#t (+ 3 5) (/ 5 0))) [image] [image] /: division by zero > ((lambda-if my-#t (lambda () (+ 3 5)) (lambda () (/ 5 0)))) 8 > (lambda-if my-#t (lambda () (+ 3 5)) (lambda () (/ 5 0))) 8 > (fact 10) 3628800 > (fact 5) 120 > (fact 7) 5040 > ((gamma id) 0) 1 > ((gamma id) 1) 0 > ((gamma id) 2) 2 > ((gamma id) 3) 6 > ((gamma id) 4) 12 > ((gamma id) 5) 20 > ((gamma (gamma id)) 0) 1 > ((gamma (gamma id)) 1) 1 > ((gamma (gamma (gamma (gamma (gamma 'error))))) 0) 1 > ((gamma (gamma (gamma (gamma (gamma 'error))))) 1) 1 > ((gamma (gamma (gamma (gamma (gamma 'error))))) 2) 2 > ((gamma (gamma (gamma (gamma (gamma 'error))))) 3) 6 > ((gamma (gamma (gamma (gamma (gamma 'error))))) 4) 24 > ((gamma (gamma (gamma (gamma (gamma 'error))))) 5) [image] [image] application: not a procedure; expected a procedure that can be applied to arguments given: error arguments