0
I have the following Prolog code which samples n items from a list without replacement:
samp(0,_,Sample,Sample).
samp(N,Domain0, Sample0, Sample):-
N >= 0,
length(Domain0,L),
RandomNumber is random(L),
nth0(RandomNumber, Domain0, X),
delete(Domain0,X,Domain1),
append(Sa...