Ask your own question, for FREE!
Computer Science 20 Online
OpenStudy (anonymous):

On Dr Racket: write a scheme function that consumes a 9 digit function and an integer between 1 and 9 (inclusive). And produces a digit at the specified location. EX: (sin-digit 463290115 6) => 0: do not convert the 9 digit number to a string.

OpenStudy (anonymous):

(define (int->list n) (if (< n 10) (list n) (append (int->list (floor (/ n 10))) (list (remainder n 10))))) (define (foo l index) (if (= index 1) (car l) (foo (cdr l) (sub1 index)))) (define (sin-digit n index) (foo (int->list n) index))

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!