I am trying to use a supposedly built in procedure in SWI-Prolog. The procedure in question is sort/4.
The thing is, when I try to use it in my program I get the following error:
ERROR: Undefined procedure: sort/4
ERROR: However, there are definitions for:
ERROR: msort/2
ERROR: sort/2
I don't understand because the documentation says its built-in, but Prolog doesn't know it. I really need to use this procedure
Would you know how to fix this issue ? I thought it was a matter of library and tried to add ":- use_module(library(lists))." at the beginning of my code but the situation remains the same.
Hope you can help me, have a good day
$ swipl --version
. - user1812457sort/4
covers the majority of use-cases I have seen. Definitely more versatile thansort/2
,msort/2
,keysort/2
, and requires less code to use. - user1812457