Created
March 28, 2010 14:00
-
-
Save Ejhfast/346774 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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