Skip to content

Instantly share code, notes, and snippets.

@Ejhfast
Created March 28, 2010 14:00
Show Gist options
  • Save Ejhfast/346774 to your computer and use it in GitHub Desktop.
Save Ejhfast/346774 to your computer and use it in GitHub Desktop.
(defn list-crossover
"A generic crossover function for simple lists. You may need to write your own."
[[s1 s2]]
(let [point (rand-int
(min (count s1)
(count s2)))]
(concat (take point s1)
(drop point s2))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment