erg/examples/quantified.er
Shunsuke Shibayama 96132b20f6 initial commit
2022-08-10 23:02:27 +09:00

12 lines
246 B
Python

id|T|(x: T): T = x
assert id(1) == 1
assert id(True) == True
assert id("hello") == "hello"
const|T, C|(c: C): C = _: T -> c
assert const(1)(2) == 1
assert const(True)(2) == True
print_to_str!|S <: Show|(s: S): Str =
print! s
s.to_str()