Welcome to Racket v7.2. > (hailstone-count 16) 5 > (hailstone-count 32) 6 > (hailstone-count 5) 6 > (hailstone-count 10) 7 > (hailstone-count 64) 7 > (hailstone-count 3) 8 > (hailstone-count 128) 8 > (hailstone-f 0) empty > (hailstone-f 1) # > ((hailstone-f 1) 0) 1 > ((hailstone-f 1) 1) 1 > ((hailstone-f 1) 2) ; application: not a procedure; ; expected a procedure that can be applied to arguments ; given: empty ; [,bt for context] > ((hailstone-f 3) 2) 2 > ((hailstone-f 3) 4) 3 > ((hailstone-f 3) 5) ; application: not a procedure; ; expected a procedure that can be applied to arguments ; given: empty ; [,bt for context] > ((hailstone-f 6) 5) 6 > ((hailstone-f 6) 10) ; application: not a procedure; ; expected a procedure that can be applied to arguments ; given: empty ; [,bt for context] > hailstone-inf ; terminate break [,bt for context] C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c C-c Process scheme exited abnormally with code 1 > (repeat-inf hailstone-op) # > hailstone-inf # > (hailstone-inf 0) 1 > (hailstone-inf 1) 1 > (hailstone-inf 16) 5 > (hailstone-inf 128) 8 > (hailstone-inf 8934) 141 > (printn (cdiv2 c3)) 1 > (printn (cdiv2 c5)) 2 > (printn (cdiv2 (c 500))) 250 > (printn (cdiv2 (c 501))) 250 > gamma-h # > (((c3 gamma-h) I) c1) # > (printn (((c3 gamma-h) I) c1)) 1 > (printn (((c3 gamma-h) I) c2)) ; c2: undefined; ; cannot reference an identifier before its definition ; in module: top-level ; [,bt for context] > (printn (((c3 gamma-h) I) (c 2))) 2 > (printn (((c3 gamma-h) I) (c 4))) 3 > (printn (((c3 gamma-h) I) (c 8))) 4 > (printn (((c3 gamma-h) I) (c 16))) 5 > (printn (((c3 gamma-h) I) (c 32))) 7 > (printn (((c3 gamma-h) I) (c 64))) 11 > (printn (((c3 gamma-h) (K c0)) (c 64))) 3 > (printn (((c3 gamma-h) (K c0)) (c 32))) 3 > (printn (((c3 gamma-h) (K c0)) (c 16))) 3 > (printn (((c3 gamma-h) (K c0)) (c 8))) 3 > (Y gamma-h) ; terminate break [,bt for context] C-c C-c Process scheme exited abnormally with code 1 > ; /: contract violation ; expected: number? ; given: "error" ; argument position: 2nd ; [,bt for context] > # > ef # > (ef 2) ; /: contract violation ; expected: number? ; given: "error" ; argument position: 2nd ; [,bt for context] > (ef 3) ; /: contract violation ; expected: number? ; given: "error" ; argument position: 2nd ; [,bt for context] > Z # > (Z gamma-h) ; gamma-h: undefined; ; cannot reference an identifier before its definition ; in module: top-level ; [,bt for context] > (Z gamma-h) # > ((Z gamma-h) c0) ; terminate break [,bt for context] C-c C-c Process scheme exited abnormally with code 1 Welcome to Racket v7.2. > (my-if (> 2 0) 5 (/ 3 "error")) ; /: contract violation ; expected: number? ; given: "error" ; argument position: 2nd ; [,bt for context] > (if (> 2 0) 5 (/ 3 "error")) 5 > ((Z gamma-h) c0) ; Z: undefined; ; cannot reference an identifier before its definition ; in module: top-level ; [,bt for context] > ((Z gamma-h) c0) # > (printn ((Z gamma-h) c0)) 1 > (printn ((Z gamma-h) c1)) 1 > (printn ((Z gamma-h) c3)) 8 > (printn ((Z gamma-h) (c 128))) 8 > (printn ((Z gamma-h) (c 64))) 7 > (printn ((Z gamma-h) (c 5))) 6 >