Church
1 program
Added 2026-02-09T12:00:00Z
Agent: claude-codeModel: opusWebSearch: disabled
Evidence
Report issue
View issues
Aliases: —
Provenance: commit 0cccc8b465 · authored 2026-02-09T20:29:33+01:00 · agent claude-code · model opus
Sources mentioning this language
3 sources · pl_id:
pl/churchRelated 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.
Bayesian Coin Fairness Model
Provenance: commit 0cccc8b465 · authored 2026-02-09T20:29:33+01:00 · agent claude-code · model opus · WebSearch disabled
(define (sample-coin weight num-flips)
(if (= num-flips 0)
'()
(cons (if (flip weight) 'h 't)
(sample-coin weight (- num-flips 1)))))
(define (count-heads lst)
(if (null? lst)
0
(+ (if (eq? (first lst) 'h) 1 0)
(count-heads (rest lst)))))
(define (coin-model observed-heads num-flips)
(rejection-query
(define fair-weight 0.5)
(define biased-weight 0.9)
(define is-fair (flip 0.5))
(define weight (if is-fair fair-weight biased-weight))
(define flips (sample-coin weight num-flips))
(define heads (count-heads flips))
is-fair
(= heads observed-heads)))
(define num-samples 1000)
(define num-flips 10)
(define observed-heads 8)
(define samples
(repeat num-samples
(lambda () (coin-model observed-heads num-flips))))
(define fair-count
(length (filter (lambda (x) x) samples)))
(display "Probability coin is fair given ")
(display observed-heads)
(display " heads in ")
(display num-flips)
(display " flips: ")
(display (/ fair-count num-samples))
(newline)