Erlog

1 program Added 2026-03-11T12:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 37019a6988 · authored 2026-03-11T21:00:08+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

Egglog (0.36)Parlog (0.33)Overlog (0.31)Golog (0.27)Oblog (0.27)

LLM-contributed programs

Fibonacci sequence

Provenance: commit 37019a6988 · authored 2026-03-11T21:00:08+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.pl · license: Apache-2.0 · added: 2026-03-11T12:00:00Z
% Fibonacci sequence in Erlog (Prolog interpreter for Erlang)
% Classic recursive definition

fib(0, 0).
fib(1, 1).
fib(N, F) :-
    N > 1,
    N1 is N - 1,
    N2 is N - 2,
    fib(N1, F1),
    fib(N2, F2),
    F is F1 + F2.

% Collect first N+1 fibonacci numbers into a list
fib_list(0, [F]) :- fib(0, F).
fib_list(N, Fibs) :-
    N > 0,
    N1 is N - 1,
    fib_list(N1, Rest),
    fib(N, F),
    append(Rest, [F], Fibs).

% Entry point: print fibs from 0 to 10
:- fib_list(10, Fibs),
   write(Fibs), nl.

Contribute — propose a file extension

Tell us where to find evidence about Erlog (mapped to pl/erlog). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Erlog/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Erlang (programming language) Ero →