Charity
1 program
Added 2026-02-05T21:19:54Z
Agent: claude-codeModel: sonnetWebSearch: enabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit b73409fedc · authored 2026-02-05T22:21:25+01:00 · agent claude-code · model sonnet
Sources mentioning this language
4 sources · pl_id:
pl/charityExtensions claimed by this language
1 claim. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.ch | linguist | primary | 179.6K files |
Related languages
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.)
Programs collected by LLM agents experimental · unverified
Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.
List and Natural Number Functions
Provenance: commit b73409fedc · authored 2026-02-05T22:21:25+01:00 · agent claude-code · model sonnet · WebSearch enabled
rf "Lnat.ch".
rf "Llist.ch".
def min_max: Lnat * Lnat -> Lnat * Lnat
= (m, n) => fn ( n
, {| Lzero: () => (fn: _ => (m, n))
| Lsucc: f => (fn: Lzero => (n, m)
| Lsucc n' => fn (lid n', lid f)
)
|}
m
).
def max_min = pn => {(m, n) => (n, m)} min_max pn.
def new_min = pn => p0 min_max pn.
def new_max = pn => p1 min_max pn.
def new_zip: Llist(A) * Llist(B) -> Llist(A * B)
= (l1, l2) => fn (l2
, {| Lnil : () => (fn: _ => Lnil)
| Lcons: p => (fn: Lnil => Lnil
| Lcons (b, (lid: l2')) =>
{ (a, f) =>
Lcons ( (a, b)
, (lid: fn (l2', f))
)
}
(p0 p, lid p1 p)
)
|}
l1
).
def take_drop: Lnat * list(A) -> list(A) * list(A)
= (n, l) => fn (l
, {| Lzero: () => (fn: l' => ([], l'))
| Lsucc: f => (fn: nil => ([], [])
| cons (a, l') => { (t, d) =>
(cons (a, t), d)
}
fn (l', lid f)
)
|}
n
).
def new_take = p => p0 take_drop p.
def new_drop = p => p1 take_drop p.
def new_eq: Lnat * Lnat -> bool
= (m, n) => fn (n, {| Lzero: () => (fn: Lzero => true
| Lsucc _ => false
)
| Lsucc: f => (fn: Lzero => false
| Lsucc (lid: n') => fn (n', lid f)
)
|}
m
).
def new_neq = pn => not new_eq pn.
def bwhile{ initial: A -> C
, iterate: C -> C
, final : C -> B
, cond : C -> bool
}:
A * Lnat -> SF(B)
= (a, n) => SF{final} fn (initial a
, {| Lzero: () => (fn: _ => ff)
| Lsucc: f => (fn: c =>
{ true => fn ( iterate c
, lid f
)
| false => ss c
}
cond c
)
|}
n
).
def diff: Lnat * Lnat -> Lnat * Lnat
= (m, n) => max_min (n, Lsub (m, n)).
def gcd: Lnat * Lnat -> SF(Lnat)
= pn => bwhile{max_min, diff, p0, new_neq} (pn, new_max pn).