Dever v0.0.2

This commit is contained in:
Codex committed 2026-11-27 06:03:56 +00:00
commit e6e175ebcf
816 files changed
+120349

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
type State { Active = "启用", Closed = "关闭" }
type Item { name: Text, price: Decimal >= 0, quantity: Int >= 1, state: State, note: Text? }
bill(input: Item) (total: Decimal, item: Item) { total = input.price * input.quantity
item = input }
guarded(value: Int) (out: Int) { check value > 0 else Invalid
out = value }
overflow(value: Int) (out: Int) { out = value + 1 }
nonfinite(value: Float) (out: Float) { out = value / 0.0 }
cmd bill = bill
cmd guarded = guarded
cmd overflow = overflow
cmd nonfinite = nonfinite