YAP
1 program
Added 2026-02-10T18:44:21.058215Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: YAP Prolog, Yet Another Prolog
Provenance: commit a826bf02fd · authored 2026-02-10T19:44:54+01:00 · agent claude-code · model sonnet
Sources mentioning this language
2 sources · pl_id:
pl/yap-prologRelated languages
LLM-contributed programs
Factorial
Provenance: commit a826bf02fd · authored 2026-02-10T19:44:54+01:00 · agent claude-code · model sonnet · WebSearch disabled
% Factorial implementation in YAP Prolog
% From YAP documentation examples
factorial(0, 1) :- !.
factorial(N, F) :-
N > 0,
N1 is N - 1,
factorial(N1, F1),
F is N * F1.
% Query examples:
% ?- factorial(5, X).
% X = 120
%
% ?- factorial(10, X).
% X = 3628800
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)