Figaro

1 program Added 2026-02-13T11:15:14Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 9f15fdfbe8 · authored 2026-02-13T12:16:17+01:00 · agent claude-code · model sonnet

Sources mentioning this language

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

Related languages

Claro (0.25)Eero (0.17)Fift (0.17)Fika (0.17)Fish (0.17)

LLM-contributed programs

Coin Fairness Inference

Provenance: commit 9f15fdfbe8 · authored 2026-02-13T12:16:17+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.scala · license: MIT · added: 2026-02-13T11:15:14Z
import com.cra.figaro.language._
import com.cra.figaro.library.atomic.continuous.Beta
import com.cra.figaro.library.atomic.discrete.Binomial
import com.cra.figaro.algorithm.factored.VariableElimination

object CoinExample {
  def main(args: Array[String]): Unit = {
    val fairness = Beta(2, 2)
    val numberOfFlips = 10
    val numberOfHeads = Binomial(numberOfFlips, fairness)

    numberOfHeads.observe(7)

    val algorithm = VariableElimination(fairness)
    algorithm.start()

    println("Probability fairness > 0.5: " + algorithm.probability(fairness, (f: Double) => f > 0.5))

    algorithm.kill()
  }
}

Contribute — propose a file extension

Tell us where to find evidence about Figaro (mapped to pl/figaro). 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/Figaro/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← FIG-Forth figlet-font →