pub const STDLIB_PL: &str = "% Standard library predicates for patch-prolog.\n% These are compiled into the binary at build time.\n\n% member/2 - check membership in a list\nmember(X, [X|_]).\nmember(X, [_|T]) :- member(X, T).\n\n% append/3 - concatenate two lists\nappend([], L, L).\nappend([H|T], L, [H|R]) :- append(T, L, R).\n\n% length/2 - length of a list\nlength([], 0).\nlength([_|T], N) :- length(T, N1), N is N1 + 1.\n\n% last/2 - last element of a list\nlast([X], X).\nlast([_|T], X) :- last(T, X).\n\n% reverse/2 - reverse a list\nreverse(List, Reversed) :- reverse_acc(List, [], Reversed).\nreverse_acc([], Acc, Acc).\nreverse_acc([H|T], Acc, Reversed) :- reverse_acc(T, [H|Acc], Reversed).\n\n% nth0/3 - zero-indexed element access\nnth0(0, [H|_], H).\nnth0(N, [_|T], X) :- N > 0, N1 is N - 1, nth0(N1, T, X).\n\n% nth1/3 - one-indexed element access\nnth1(1, [H|_], H).\nnth1(N, [_|T], X) :- N > 1, N1 is N - 1, nth1(N1, T, X).\n";