random
This commit is contained in:
parent
d58f238fc9
commit
5038517d72
1 changed files with 41 additions and 0 deletions
|
|
@ -42,6 +42,47 @@ strings :: #import "String"; // @future
|
|||
|
||||
assert x == y
|
||||
assert x != z
|
||||
|
||||
// def (
|
||||
// Add = poly[T] proc(x T, y T) T do return x + y end
|
||||
// Sub = poly[T] proc(x T, y T) T do return x - y end
|
||||
// Mul = poly[T] proc(x T, y T) T do return x * y end
|
||||
// Div = poly[T] proc(x T, y T) T do return x / y end
|
||||
// )
|
||||
|
||||
// def (
|
||||
// Addi = Add[int]
|
||||
// Addf = Add[float]
|
||||
// Subi = Sub[int]
|
||||
// Subf = Sub[float]
|
||||
// Muli = Mul[int]
|
||||
// Mulf = Mul[float]
|
||||
// Divi = Div[int]
|
||||
// Divf = Div[float]
|
||||
// )
|
||||
|
||||
// def Foo = struct {
|
||||
// x int = 1
|
||||
// y int = 2
|
||||
// z int = 3
|
||||
// }
|
||||
|
||||
// def Value = union {
|
||||
// i int
|
||||
// f float
|
||||
// b bool
|
||||
// }
|
||||
|
||||
// def Kind = enum {
|
||||
// a
|
||||
// b
|
||||
// c
|
||||
// d
|
||||
// }
|
||||
|
||||
// var foo = Foo{ x = 10, y = 20, z = 30 }
|
||||
// var val = Value{ f = 3.14 }
|
||||
// var kind = Kind.a
|
||||
END);
|
||||
|
||||
interp: Interp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue