Pangram checker: Difference between revisions

Content added Content deleted
Line 1,493: Line 1,493:
(define (is-pangram? str)
(define (is-pangram? str)
(setf chars (explode (upper-case str))) ;; Uppercase + convert string into a list of chars
(setf chars (explode (upper-case str))) ;; Uppercase + convert string into a list of chars
(setf is-pangram-status true) ;; Default value
(setf is-pangram-status true) ;; Default return value of function
(for (c (char "A") (char "Z") 1 (nil? is-pangram-status)) ;; For loop with break condition
(for (c (char "A") (char "Z") 1 (nil? is-pangram-status)) ;; For loop with break condition
(if (not (find (char c) chars)) ;; If char not found in list, "is-pangram-status" become "nil"
(if (not (find (char c) chars)) ;; If char not found in list, "is-pangram-status" becomes "nil"
(setf is-pangram-status nil)
(setf is-pangram-status nil)
)
)