Advertisement
Guest User

Untitled

a guest
Oct 6th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. (defn selection-handler [tests]
  2. (dotimes [i (count tests)]
  3. (printf "(%s) %s: %s\n"
  4. (inc i)
  5. (first (nth tests i))
  6. (or (second (nth tests i))
  7. "--")))
  8. (loop [input (dec (get-number))]
  9. (if ((set (range (count tests))) input)
  10. (nth tests input)
  11. (recur (dec (get-number))))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement