Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner question about queries

Status
Not open for further replies.

MalikHolmes

Programmer
Jun 11, 2013
1
BG
Well, ok, let's say i have these two facts:

data1([50, 20, 15, 20, 25, 20, 84]).
data2([50, 30, 15, 5, 10, 18, 60]).


I want to make a query that asks whether the N-th element of the list defined as a part of those facts is some value.

query([L1|Tail]) :- L1 is 50. This would work but only if the query is like that query([50, 30, 20].. I want to ask something like query(data1)..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top