0
爲什麼這個謂詞random_permutation
不起作用?Swi-Prolog:未定義的程序:random_permutation/2
http://www.swi-prolog.org/pldoc/doc_for?object=random_permutation/2
?- use_module(library(random)).
% library(pairs) compiled into pairs 0.00 sec, 8,880 bytes
% library(random) compiled into random 0.04 sec, 333,032 bytes
true.
?- L=[1,2,3,4,5], random_permutation(L,P).
ERROR: toplevel: Undefined procedure: random_permutation/2 (DWIM could not correct goal)
我怎樣才能使它發揮作用?
也許您正在使用舊版本.... – CapelliC