質問

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)
| ?-

Regards!

役に立ちましたか?

解決

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top