3 ms·
This is not mine, but from the “clojure grams” twitter account: (defn maze [n] (->> (repeatedly (* n n) #(rand-nth "╱╲")) (partition n) (tran
by harperlee 8y ago
This is not mine, but from the “clojure grams” twitter account:
(defn maze [n]
(->> (repeatedly (* n n) #(rand-nth "╱╲"))
(partition n)
(transduce
(comp
(map #(apply str %))
(interpose "\n"))
str)))
Simpler output but related and also quite interesting!
- Aardappel 8y agoLooks like a port of this Basic one-liner: http://www.slate.com/articles/technology/books/2012/11/computer_programming_10_print_chr_205_5_rnd_1_goto_10_from_mit_press_reviewed.html http://www.slate.com/articles/technology/books/2012/11/compu...