erg/examples/quantified.er
Shunsuke Shibayama dd36942256 feat: implement some typevar-related syntax sugar
* add `TypeBoundSpec::Omitted`
* add `TypeAppArgsKind`
2023-03-01 23:35:19 +09:00

14 lines
277 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): (T -> C) = (_: T,) -> c
print! const(1)(2)
assert const(True)(2) == True
print_to_str!|S <: Show|(s: S): Str =
print! s
s.to_str()
discard print_to_str!(1)