Last active
August 22, 2018 12:27
-
-
Save theodesp/afb7f68ffbe412623b759d8349519215 to your computer and use it in GitHub Desktop.
Range of numbers #scheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(import (rnrs (6))) | |
(use-modules ((rnrs) :version (6))) | |
(define (range from to step) | |
"" Range from to using step | |
(if (>= from to) | |
'() | |
(cons from (range (+ from step) to step)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment