Skip to content

Instantly share code, notes, and snippets.

@tomjack
Created February 18, 2012 14:49
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 tomjack/74eb36db2e78d49291a9 to your computer and use it in GitHub Desktop.
Save tomjack/74eb36db2e78d49291a9 to your computer and use it in GitHub Desktop.
(apply str (loop [x "apple"
y "orange"
r []]
(if (seq x)
(if (seq y)
(if (< (rand) 0.5)
(recur (next x) y (conj r (first x)))
(recur x (next y) (conj r (first y))))
(into r x))
(into r y))))
;; "aoprpleange"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment