programlibs/Check/demos/table.xtl

Table-driven checks: c_ases< writes one check per row when the program is compiled, each named by its own source text, so a failing case says which without writing the expression twice. The last row is wrong on purpose (# shows failures). Run with "just demo Check table".

source · imports k: libs/Check/src/Check.xtl libs/Check/src/Check.xtlm

ᵘc̲lamp : Num a => a -> a

function · line 8
ᵘc̲lamp ← { x → 0 m̲ax 10 m̲in x }             ⍝ keep x within 0 to 10