add basic support for tuples
This commit is contained in:
parent
7bb277045c
commit
e03d18c7db
7 changed files with 339 additions and 18 deletions
11
tests/tuple.ang
Normal file
11
tests/tuple.ang
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
assertEq((1, 2), (1, 2))
|
||||
|
||||
assertEq(type((1,)), type((1,)))
|
||||
assertEq((1,), (1,))
|
||||
|
||||
fn neighbours(n: int) -> (int, int) {
|
||||
(n-1, n+1)
|
||||
}
|
||||
|
||||
assertEq(neighbours(2), (1, 3))
|
||||
Loading…
Add table
Add a link
Reference in a new issue