0 Replies - 1155 Views - Last Post: 02 August 2010 - 08:12 AM

#1 Crunch   User is offline

  • D.I.C Lover
  • member icon

Reputation: 139
  • View blog
  • Posts: 1,222
  • Joined: 28-July 09

[Scheme] Check Vowel

Posted 02 August 2010 - 08:12 AM

Description: Prints True if Vowel is found If Vowel is not found displays nothing
(define vowellist (list "A" "E" "I" "O" "U" "a"  "e"  "i"  "o"  "u"))

(define (loop x x-max step c)
  (if (<= x x-max)
    (begin    
      
   (if (=  (char->integer (string-ref c 0))  (char->integer (string-ref (list-ref vowellist x ) 0) ) ) (display "True" )  )         
      
      
      (loop (+ x step) x-max step c))))

(define check(lambda ( x )
          
             (loop 0 ( - (length vowellist) 1) 1 x)
            
               
               ))


Is This A Good Question/Topic? 0
  • +

Page 1 of 1