MetaML

1 program Added 2026-02-28T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled Evidence Report issue View issues
Aliases: MetaML
Provenance: commit 6d90bc2032 · authored 2026-02-28T12:13:51+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

2 sources · pl_id: pl/metaml
LLM (this repo) · 1Pldb

Related languages

MetaOCaml (0.39)Metamath (0.36)ML (0.29)Metafont (0.27)Metalua (0.27)

LLM-contributed programs

Staged Power Function

Provenance: commit 6d90bc2032 · authored 2026-02-28T12:13:51+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
code.ml · added: 2026-02-28T10:00:00Z
(* MetaML: Staged Power Function *)
(* from Taha, W. "A Gentle Introduction to Multi-stage Programming" *)

let rec power : int -> <int -> int> =
  fun n ->
    if n = 0 then
      <fun _ -> 1>
    else
      <fun x -> x * ~(power (n-1)) x>

let () =
  let p3 = run (power 3) in
  Printf.printf "2^3 = %d\n" (p3 2);
  Printf.printf "3^3 = %d\n" (p3 3);
  Printf.printf "4^3 = %d\n" (p3 4)

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.)

Contribute — propose a file extension

Tell us where to find evidence about MetaML (mapped to pl/metaml). 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/MetaML/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Metamath MetaOCaml →