user2098292
user2098292

Reputation: 43

maplist raises uncaught exception: error(existence_error(procedure,maplist/2),top_level/0)

The following used maplist works in swi-prolog not in gprolog:

GNU Prolog 1.3.1
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz
| ?- maplist(writeln,[1,2,3]).
uncaught exception: error(existence_error(procedure,maplist/2),top_level/0)
| ?-

Upvotes: 3

Views: 639

Answers (1)

Aurélien Bénel
Aurélien Bénel

Reputation: 3842

I've just tested it on my gprolog:

GNU Prolog 1.4.1
By Daniel Diaz
Copyright (C) 1999-2012 Daniel Diaz
| ?- maplist(write,[1,2,3]).  
123

Therefore maplistis defined in newer versions.

Please also note that there is no writeln in gprolog, so if you need it, you will have to define it first.

Upvotes: 3

Related Questions