help please in lists 
Author Message
 help please in lists

Hey!

I need help. Just getting started with SWI Prolog. I need to know if
there is an element in a list.
Example: something like this...

lager_matrix([1,2,3,4,5,6,7,8,9,10],[1,2,3,4,5]).

enthalten(X,[X|_]).
enthalten(X,[_|R]):- enthalten(X,R).

i want to give one number to the system and i want to now if this
element is in the first list [1,2,3,4,5,6,7,8,9,19]. How to modify the
code to get it?

sebastian



Mon, 10 May 2004 16:55:48 GMT  
 help please in lists
The magic phrase is ....

help(member).

<quote>
member(?Elem, ?List)
    Succeeds  when Elem can be unified with one of the members  of List.
    The predicate can be used with any instantiation pattern.
</quote>

Yes.

Eowine.



Mon, 10 May 2004 17:14:53 GMT  
 help please in lists
Thanks, cool i found the help :-)

Eowine Eomundsdottir schrieb:

Quote:
> The magic phrase is ....

> help(member).

> <quote>
> member(?Elem, ?List)
>     Succeeds  when Elem can be unified with one of the members  of List.
>     The predicate can be used with any instantiation pattern.
> </quote>

> Yes.

> Eowine.



Mon, 10 May 2004 21:10:51 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. list of lists?? please help

2. please, please, please, please, help

3. will someone please, please, please, please HELP me?!!

4. VSE 3.1 Repository Problem: Please help (please please?)

5. Need Help, please! (to update a list box)

6. Please Help: Adding Edit-in-Place checkbox to a List Box

7. PLEASE HELP FOR LIST BOXES PROBLEM!

8. !!!@@@@ HELP (Queue v/s List) Please

9. Queues in List boxes - Please Help

10. Queues in List boxes - Please Help

11. Please Help with List Box

12. Browse List Icon help... Please

 

 
Powered by phpBB® Forum Software