Skip to content

Instantly share code, notes, and snippets.

@mnogu
Created April 4, 2010 13:30
Show Gist options
  • Select an option

  • Save mnogu/355398 to your computer and use it in GitHub Desktop.

Select an option

Save mnogu/355398 to your computer and use it in GitHub Desktop.
(define consonant?
(lambda(c)
(and (char-alphabetic? c)
(not (find (lambda(c2) (char-ci=? c c2)) '(#\a #\e #\i #\o #\u))))))
; (consonant? #\a) => #f
; (consonant? #\E) => #f
; (consonant? #\-) => #f
; (consonant? #\r) => #t
; (consonant? #\S) => #t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment