-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsample.ntwt
More file actions
58 lines (46 loc) · 816 Bytes
/
Copy pathsample.ntwt
File metadata and controls
58 lines (46 loc) · 816 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
$: pair
$ int first
$ uint second
$ pair p
$@ #int fill_arr #int arr int ind
? ~= ind |#| arr
= #arr ind ind
=> @fill_arr arr + ind 1
!
=> arr
$@ void test_arr
$ int i
$ #int a1
$ ~#int a2 a1
$ ##int a3
% #int 10 ;test ref removal in expressions
= a1 @ fill_arr % #int 10 0
<< #a1 5
<< == a1 a2
<< == . a2
<< == a1 .
<< ~= . .
? == . .
= a1 .
<< == a1 a2
= a1 % #int 10
<< == a1 a2
<< == a1 .
= a2 a1
<< == a1 a2
<< == a2 .
$@ void test_member
$ pair p % pair
>> :p first
>> :p second
<< + :p first :p second
$@ int main
$ int64 n 9223372036854775807
>> n
$ int i 1
$ int sum 0
[] <= i n
<< i
+= sum i
+= i 1
<< sum