scheme - How to return a list of numbers between 1 and x -
i'm trying create function takes in user input, x, , displays of numbers 1 x. not quite sure go here:
(define (iota x) (if (>= x 1) (display
(define iota2 (lambda (y) (let loop ((n 1)) (if (<= n y) (cons n (loop (+ n 1))) '()))))
Comments
Post a Comment