Skip to content

Instantly share code, notes, and snippets.

@swannodette swannodette/questions.clj
Last active Dec 16, 2015

What would you like to do?
(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
You can’t perform that action at this time.