Skip to content

Instantly share code, notes, and snippets.

@theodesp
Last active August 22, 2018 12:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theodesp/afb7f68ffbe412623b759d8349519215 to your computer and use it in GitHub Desktop.
Save theodesp/afb7f68ffbe412623b759d8349519215 to your computer and use it in GitHub Desktop.
Range of numbers #scheme
(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