Skip to content

Instantly share code, notes, and snippets.

@swannodette
Last active December 16, 2015 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swannodette/5420253 to your computer and use it in GitHub Desktop.
Save swannodette/5420253 to your computer and use it in GitHub Desktop.
(defn questions [ln vec]
(let [f (first ln)
l (last ln)
x (get vec f)]
(if (<= f l)
(if (.isUpperCase Character (first x))
((print x) (questions (cons (inc l) l) vec))
((print x) (questions (cons (dec l) l)) vec)))
(if (= (last x) \?)
((print x) (questions (cons (dec f) f) vec))
(questions (cons (inc f) l) vec))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment