isicp icon indicating copy to clipboard operation
isicp copied to clipboard

Exercise 2.5 not working

Open louisabraham opened this issue 9 years ago • 0 comments

My code works but is not correctly evaluated. This occurs in other exercises as well.

(define (cons a b)
  (* (expt 2 a)
     (expt 3 b)))

(define (val n i)
  (if (zero? (modulo n i))
      (+ 1 (val (/ n i) i))
      0
  )
)

(define (car p) (val p 2))

(define (cdr p) (val p 3))

louisabraham avatar Aug 09 '16 15:08 louisabraham