> (p 3 5) 194 > (p 3 5) [image] [image] id: undefined; cannot reference an identifier before its definition > (p 3 5) 50 > (p 3 5) 2930 [image] read-syntax: unexpected `)` > (p 3 5) 50 > (p 3 5) 50 > (p 3 5) 194 194 50 586 50 194 50 586 194 194 50 586 50 194 50 586 194 194 50 586 194 > (fact 5) 120 > (fact 50) 30414093201713378043612608166064768844377641568960512000000000000 194 50 586 194 > (fact 0) 1 194 50 586 194 > (pow 2 16) 65536 194 50 586 194 > (exp 1) 2.718281828459045 > (myexp 1 3) 8/3 > (+ .0 (myexp 1 3)) 2.6666666666666665 > (+ .0 (myexp 1 5)) 2.716666666666667 > (+ .0 (myexp 1 10)) 2.7182818011463845 > (+ .0 (myexp 1 20)) 2.718281828459045 > (myexp 1 3) 8/3 > (exp 1) 2.718281828459045 194 50 586 194 > (exp 1) 2.718281828459045 > (myexp 1 10) 9864101/3628800 > (+ .0 (myexp 1 10)) 2.7182818011463845 > (+ .0 (myexp 1 15)) 2.7182818284589945 > (+ .0 (myexp 1 20)) 2.718281828459045 194 50 586 194 [image] or: bad syntax in: or 194 50 586 194 > (exists? odd? 1 5) #t > (exists? negative? 1 5) #f > (exists? positive? 1 10000000000) [image] Interactions disabled; out of memory 194 50 586 194 > (exists? positive? 1 10000000000) 194 50 586 194 > (exists? positive? 1 1000000000000000000000000) #t 194 50 586 194 > (procedure? procedure?) #t > (((twice twice) (lambda (x) (* x x))) 2) [image] [image] twice: undefined; cannot reference an identifier before its definition 194 50 586 194 > (((twice twice) (lambda (x) (* x x))) 2) 65536 194 50 586 194 > (repeated 1+ 5 10) [image] [image] repeated: arity mismatch; the expected number of arguments does not match the given number expected: 3 given: 2 194 50 586 194 > (repeated 1+ 5 10) 15 194 50 586 194 > ((repeated 1+ 5) 10) 15 > (lambda (x) x) # 194 50 586 194 > ((repeated 1+ 5) 10) [image] [image] compose: undefined; cannot reference an identifier before its definition 194 50 586 194 > ((repeated 1+ 5) 10) 15 194 50 586 194 > ((repeated 1+ 5) 10) 15 194 50 586 194 > ((derive-n (lambda (x) (* x x x)) 2 0.01) 3) 18.060000000019727 194 50 586 194 > ((derive-n (lambda (x) (* x x x)) 2 0.01) 3) [image] [image] derive: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 1 194 50 586 194 > ((derive-n (lambda (x) (* x x x)) 2 0.01) 3) [image] [image] derive: arity mismatch; the expected number of arguments does not match the given number expected: 2 given: 1 194 50 586 194 > ((derive-n (lambda (x) (* x x x)) 2 0.01) 3) # 194 50 586 194 > ((derive-n (lambda (x) (* x x x)) 2 0.01) 3) [image] [image] ...cheme/highorder.scm:72:2: arity mismatch; the expected number of arguments does not match the given number expected: 1 given: 0 194 50 586 194 > ((derive-n (lambda (x) (* x x x)) 2 0.01) 3) 18.060000000019727 194 50 586 194 > (my-if my#t 5 3) 5 > (my-if my#f 5 3) 3 > (my-if my#t 5 (/ 3 0)) [image] [image] /: division by zero > (if #t 5 (/ 3 0)) 5 > (my-if my#t 5 (/ 3 0)) [image] [image] /: division by zero > (lambda (x) (+ 2 3)) # > ((lambda (x) (+ 2 3)) 12093) 5 > ((lambda () (+ 2 3))) 5 > (lambda () (/ 2 0)) # > ((lambda () (/ 2 0))) [image] [image] /: division by zero > (lambda () (tova e glupost)) # > ((lambda () (tova e glupost))) [image] [image] tova: undefined; cannot reference an identifier before its definition 194 50 586 194 > (my-if my#t (lambda () (+ 2 3)) (lambda () (/ 3 0))) 5 > (if #t 5 (/ 3 0)) 5 > (my-if my#f (lambda () (+ 2 3)) (lambda () (/ 3 0))) [image] [image] /: division by zero > (if #f 5 (/ 3 0)) [image] [image] /: division by zero > (my-if my#f (lambda () (dali shte se oceni...)) (lambda () (+ 3 5))) 8