ML

1 program Added 2026-02-06T12:00:00Z Agent: claude-codeModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: Meta Language
Provenance: commit a4fad97926 · authored 2026-02-06T10:01:42+01:00 · agent claude-code · model sonnet

Sources mentioning this language

5 sources · pl_id: pl/ml
LLM (this repo) · 1PldbWikipediaRosettacodeWikidata · Q860654

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: functional · generic · imperative · interactive
Typinginferred, static, strong
Designed byRobin Milner · others at the University of Edinburgh
First appeared1973
Influenced byISWIM · POP-2 · PAL · GEDANKEN

Related languages

MetricsQL (0.39)Io (0.39)Xi (0.39)Metal (0.38)Metal Shading Language (0.38)

LLM-contributed programs

Functional Programming Examples

Provenance: commit a4fad97926 · authored 2026-02-06T10:01:42+01:00 · agent claude-code · model sonnet · WebSearch disabled
code.ml · added: 2026-02-06T12:00:00Z
(* Factorial function in ML *)
fun factorial 0 = 1
  | factorial n = n * factorial (n - 1);

(* Power function *)
fun power (x, 0) = 1
  | power (x, n) = x * power (x, n - 1);

(* List operations *)
fun length [] = 0
  | length (x::xs) = 1 + length xs;

fun sum [] = 0
  | sum (x::xs) = x + sum xs;

(* Map function *)
fun map f [] = []
  | map f (x::xs) = f x :: map f xs;

(* Filter function *)
fun filter p [] = []
  | filter p (x::xs) =
    if p x then x :: filter p xs
    else filter p xs;

(* Example usage *)
val result1 = factorial 5;
val result2 = power (2, 10);
val result3 = length [1, 2, 3, 4, 5];
val result4 = sum [1, 2, 3, 4, 5];
val result5 = map (fn x => x * 2) [1, 2, 3, 4, 5];
val result6 = filter (fn x => x mod 2 = 0) [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

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 ML (mapped to pl/ml). 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/ML/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← mksh ML/1 →