RosettaCodeData/Task/Combinations/Prolog/combinations-1.pro

8 lines
121 B
Prolog
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
:- use_module(library(clpfd)).
comb_clpfd(L, M, N) :-
length(L, M),
L ins 1..N,
chain(L, #<),
label(L).