Prolog permutation

Please support our Legacy and Other Languages advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Nov 2006
Posts: 1
Reputation: s1337m is an unknown quantity at this point 
Solved Threads: 0
s1337m s1337m is offline Offline
Newbie Poster

Prolog permutation

 
0
  #1
Nov 25th, 2006
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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Legacy and Other Languages Forum
Thread Tools Search this Thread



Tag cloud for Legacy and Other Languages
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC