Gathering Solutions
From: Kareem Nutt (methodmano_at_gmail.com)
Date: 11/08/04
- Previous message: David Vago: "Re: newbie qu."
- Next in thread: student: "Re: Gathering Solutions"
- Reply: student: "Re: Gathering Solutions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 07 Nov 2004 18:06:52 -0500
I have the following predicate that returns the following as an example:
findPosSol(19,2,L).
L = [1, 1, 3, 3, 11] ;
L = [1, 1, 3, 5, 9] ;
L = [1, 1, 3, 7, 7] ;
L = [1, 1, 5, 5, 7] ;
What I would like to do is of these four, find the correct solution to
which I have the following predicate:
sol(L,N).
(prints out some stuff if solution is correct)
How do I run each one of my possible solutions through sol(L,N). I
tried using bagof and findall but they were returning things I didn't
want (or I was using them wrong).
Any help/ideas are greatly appreciated. Thanks!
- Previous message: David Vago: "Re: newbie qu."
- Next in thread: student: "Re: Gathering Solutions"
- Reply: student: "Re: Gathering Solutions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|