0

I have a problem with Prolog and the XPCE cycle menu.

Here is my code:

list:-
new(D,dialog('List')),
send_list(D,append,
[
new(Von,menu(von,cycle)),
new(Zu,menu(zu,cycle)),
new(Ok,button('OK'))
]),
send_list(Von, append, findall(X,city(X),Y)),
send_list(Zu, append, findall(X,city(X),Y)),
send(D,open).

city(berlin).
city(london).
city(paris).
city(rom).

My problem is, that he can use the findall term.

ERROR: findall: Unknown class

But the findall goes well if u use it solo.

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Prolog is not a functional language.

findall(X,city(X),Y),
send_list(Von, append, Y),

should work

Cœur
  • 37,241
  • 25
  • 195
  • 267
joel76
  • 5,565
  • 1
  • 18
  • 22