Anonymous user
Menu: Difference between revisions
→{{header|Clojure}}: fix verification and return type; add example invocation
No edit summary |
(→{{header|Clojure}}: fix verification and return type; add example invocation) |
||
Line 156:
=={{header|Clojure}}==
<lang
(if (empty?
""
(let [
(
(print prompt)
▲ (println menustr)
(flush)
(let [
; verify
(if (or
(> index (
; try again
(recur prompt choices)
; ok
(nth choices (dec index)))))))
(println "You chose: "
(menu "Which is from the three pigs: "
["fee fie" "huff and puff" "mirror mirror" "tick tock"]))</lang>
=={{header|Common Lisp}}==
|