Last active
August 23, 2018 12:12
-
-
Save theodesp/f991d2ca9638ca87bdf3f225dea602e8 to your computer and use it in GitHub Desktop.
Get sign of Number #scheme
This file contains hidden or 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 (sign number) | |
(cond | |
((< number 0) 'negative) | |
((= number 0) 'zero) | |
(else 'positive)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment