0 Replies - 1068 Views - Last Post: 07 April 2010 - 12:38 AM

#1 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 614
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

[Lisp] [Clojure] A Pangram Checker

Posted 07 April 2010 - 12:38 AM

Description: This function checks to see if it's argument is a pangram (a string with all the letters of the English alphabet in it).
(defn pangram? [s]
  (let [letters (into #{} "abcdefghijklmnopqrstuvwxyz")]
    (= (->> s .toLowerCase (filter letters) (into #{})) letters)))

Is This A Good Question/Topic? 0
  • +

Page 1 of 1