Scheme Switch-Statement Syntax -
what smartest way create switch statement in scheme?
i want check 1 value against several others, if 1 results true entire function should result true, otherwise false. not syntax in scheme.
in scheme have case
:
(case (car '(c d)) ((a e o u) 'vowel) ((w y) 'semivowel) (else 'consonant)) ; ==> consonant
as see compares against literal data. cannot compare value other variables. need cond
Comments
Post a Comment