LucidSynchrone
1 program
Added 2026-03-17T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Lucid Synchrone
Provenance: commit 8a39b1e5e8 · authored 2026-03-17T07:06:21+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Edge Detector and Counter
Provenance: commit 8a39b1e5e8 · authored 2026-03-17T07:06:21+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
(* LucidSynchrone: edge detector and counter example *)
(* Synchronous reactive programming in ML-like syntax *)
(* detect a rising edge of a boolean signal *)
let node edge (b : bool) : bool =
b && not (false -> pre b)
(* count the number of true values seen so far *)
let node count (x : bool) : int =
let rec n = if x then (0 -> pre n) + 1 else (0 -> pre n) in
n
(* a simple period-n clock: true every n steps *)
let node clock (n : int) : bool =
let rec c = 0 -> (pre c + 1) mod n in
c = 0