Sha256: 85d73c993de4e9ab1f60e53537dc1d257f38a82a69faa7df33520bd0f252cdda
Contents?: true
Size: 270 Bytes
Versions: 59
Compression:
Stored size: 270 Bytes
Contents
pascal(0, []) :- !. pascal(X, P) :- numlist(1, X, NL), maplist(pascalH, NL, P). pascalH(1, [1]) :- !. pascalH(N, [X|L]) :- succ(N1, N), pascalH(N1, [X|L1]), build([X|L1], L), !. build([X], [X]). build([X,Y|Z], [H|R]) :- H is X+Y, build([Y|Z], R).
Version data entries
59 entries across 59 versions & 1 rubygems