Created
August 17, 2011 21:55
-
-
Save Pet3ris/1152744 to your computer and use it in GitHub Desktop.
nd_merge translated from http://ir.lib.sfu.ca/bitstream/1892/7097/1/b15233182.pdf
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
nd_merge xs ys | |
| choice == 1 && xs == [] = ys | |
| choice == 2 && ys == [] = xs | |
| choice == 1 = (head xs):nd_merge (tail xs) ys | |
| otherwise = (head ys):nd_merge xs (tail ys) | |
where choice = amb (seq xs 1) (seq ys 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment