954,190 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Prolog permutation

Hi guys, im working on writing a prolog permutation function. I know there's some snippets of code here and there on the net, but my permutation has to be in natural order, ie. [1,2,3] [1,3,2]. Regardless, I am just confused on the bindings of the variables. If the function is called

perm([1,2,3], Z).

How is Z being bound slowly to 1, [1,2], [1,2,3]?
I think my not being able to code the function is that mental block. I appreciate any help

s1337m
Newbie Poster
1 post since Nov 2006
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You