Clean
1 program
Added 2025-10-23T08:13:44Z
Model: x-ai/grok-4-fastTemp: 0.4
Evidence
Report issue
View issues
Aliases: —
Provenance: commit f61d7f36a1 · authored 2025-10-23T10:13:44+02:00 · model x-ai/grok-4-fast
Sources mentioning this language
8 sources · pl_id:
pl/cleanWikipedia infobox ↗
Pulled from the
wikimedia/structured-wikipedia
snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and
pl_fact.csv for the long-table provenance.
| Paradigms | functional |
|---|---|
| Typing | strong, static, dynamic |
| Designed by | Software Technology Research Group of Radboud University Nijmegen |
| First appeared | 1987 |
| Influenced by | Lean · Miranda · Haskell |
| License | Simplified BSD |
| Homepage | https://clean.cs.ru.nl |
Extensions claimed by this language
7 claims. Each row is one upstream assertion with its strength.
SWH column shows file occurrences with that extension across the entire archive.| Extension | Source | Strength | SWH |
|---|---|---|---|
.icl | linguist | primary | 66.2K files |
.icl | pygments | primary | 66.2K files |
.dcl | linguist | secondary | 62.7K files |
.dcl | pygments | secondary | 62.7K files |
.abc | wikipedia | proposed | 297.8K files |
.dcl | wikipedia | proposed | 62.7K files |
.icl | wikipedia | proposed | 66.2K files |
Related languages
LLM-contributed programs
Conway's Game of Life simulation
Provenance: commit f61d7f36a1 · authored 2025-10-23T10:13:44+02:00 · model x-ai/grok-4-fast · Temp 0.4
module life
import StdEnv, StdArray
:: Cell = Alive | Dead
:: Grid = {Grid :: !u:u:[Cell] !Int !Int}
initGrid :: Int Int -> Grid
initGrid rows cols = {Grid {Dead \ _ <- [1..rows*cols]} rows cols}
setCell :: Int Int Cell Grid -> Grid
setCell row col cell grid
# (Grid cells r c) = grid
# idx = row * c + col
# cells = {cells & [idx] = cell}
= {Grid cells r c}
countNeighbours :: Int Int Grid -> Int
countNeighbours row col grid
# (Grid _ r c) = grid
= sum [isAlive (getCell (row+dr) (col+dc) grid) \ (dr,dc) <- deltas]
where
deltas = [(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)]
getCell r c g
| r < 0 || r >= fst3 g || c < 0 || c >= snd3 g = Dead
| otherwise = thd3 g.[r * snd3 g + c]
isAlive Alive = 1
isAlive Dead = 0
fst3 (Grid a b c) = b
snd3 (Grid a b c) = c
thd3 (Grid a b c) = a
nextGen :: Grid -> Grid
nextGen grid
# (Grid cells rows cols) = grid
= foldl (flip (foldl (\g r -> foldl (\gg c -> setCell r c (nextState r c grid) gg) g [0..cols-1])))
{grid & Grid.cells = {cells}}
[0..rows-1]
where
nextState r c g = case (isAlive cells.[r*cols+c], countNeighbours r c g) of
(True, n) | n < 2 || n > 3 -> Dead
| otherwise -> Alive
(False, 3) -> Alive
_ -> Dead
isAlive :: Cell -> Bool
isAlive Alive = True
isAlive Dead = False
toString :: Grid -> [Char]
toString {Grid cells rows cols} = concat [[toChar cells.[r*cols+c] \ c <- [0..cols-1]] ++ "\n" \ r <- [0..rows-1]]
where
toChar Alive = '*'
toChar Dead = '.'
Start :: *World
Start
# glider = foldl (\g (r,c) -> setCell r c Alive g) (initGrid 5 5) [(1,2),(2,3),(3,1),(3,2),(3,3)]
= StdEnv.printn (toString (iterate nextGen glider !! 5))
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.)