diff --git a/README.md b/README.md index 4f44446..6eaa24c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # iNet Cute -[ [Website](https://inet.run) ] - An implementation of [interaction nets](https://en.wikipedia.org/wiki/Interaction_nets). - ASCII art inspired syntax. diff --git a/TODO.md b/TODO.md index 6f88daa..8b13789 100644 --- a/TODO.md +++ b/TODO.md @@ -1 +1 @@ -remove playground links from articles + diff --git a/docs/articles/programming-with-interaction-nets.md b/docs/articles/programming-with-interaction-nets.md index 67f88ed..9a3d440 100644 --- a/docs/articles/programming-with-interaction-nets.md +++ b/docs/articles/programming-with-interaction-nets.md @@ -406,10 +406,6 @@ In which we will use `define` to define new words, and before using `define` to define a new word, we must use `claim` to claim the type of the word. -We have an online playground, which can be used to easily share code. - -[Goto the playground of `Nat` and `(add)`](https://inet.run/playground/dHlwZSBOYXQgLS0gQFR5cGUgZW5kCgpub2RlIHplcm8KICAtLS0tLS0tLS0tLS0KICBOYXQgOnZhbHVlIQplbmQKCm5vZGUgYWRkMQogIE5hdCA6cHJldgogIC0tLS0tLS0tLS0tLQogIE5hdCA6dmFsdWUhCmVuZAoKbm9kZSBhZGQKICBOYXQgOnRhcmdldCEKICBOYXQgOmFkZGVuZAogIC0tLS0tLS0tLS0tLQogIE5hdCA6cmVzdWx0CmVuZAoKcnVsZSB6ZXJvIGFkZAogIChhZGQpLWFkZGVuZAogIHJlc3VsdC0oYWRkKQplbmQKCnJ1bGUgYWRkMSBhZGQKICAoYWRkKS1hZGRlbmQKICAoYWRkMSktcHJldiBhZGQKICBhZGQxIHJlc3VsdC0oYWRkKQplbmQKCmNsYWltIG9uZSAtLSBOYXQgZW5kCgpkZWZpbmUgb25lCiAgemVybyBhZGQxCmVuZAoKY2xhaW0gdHdvIC0tIE5hdCBlbmQKCmRlZmluZSB0d28KICBvbmUgYWRkMQplbmQKCmNsYWltIGFkZDIgTmF0IC0tIE5hdCBlbmQKCmRlZmluZSBhZGQyCiAgdHdvIGFkZAplbmQKCm9uZSBhZGQyCm9uZSBhZGQyCmFkZA) - ``` type Nat -- @Type end @@ -673,8 +669,6 @@ rule add1 maxAux end ``` -[Goto the playground of `Nat` and `(max)`](https://inet.run/playground/dHlwZSBOYXQgLS0gQFR5cGUgZW5kCgpub2RlIHplcm8KICAtLS0tLS0KICBOYXQgOnZhbHVlIQplbmQKCm5vZGUgYWRkMQogIE5hdCA6cHJldgogIC0tLS0tLS0tLS0KICBOYXQgOnZhbHVlIQplbmQKCm5vZGUgbWF4QXV4CiAgTmF0IDpmaXJzdAogIE5hdCA6c2Vjb25kIQogIC0tLS0tLS0tCiAgTmF0IDpyZXN1bHQKZW5kCgpub2RlIG1heAogIE5hdCA6Zmlyc3QhCiAgTmF0IDpzZWNvbmQKICAtLS0tLS0tLS0tCiAgTmF0IDpyZXN1bHQKZW5kCgpydWxlIHplcm8gbWF4CiAgKG1heCktc2Vjb25kIHJlc3VsdC0obWF4KQplbmQKCnJ1bGUgYWRkMSBtYXgKICAobWF4KS1zZWNvbmQgKGFkZDEpLXByZXYgbWF4QXV4CiAgcmVzdWx0LShtYXgpCmVuZAoKcnVsZSB6ZXJvIG1heEF1eAogIChtYXhBdXgpLWZpcnN0IGFkZDEKICByZXN1bHQtKG1heEF1eCkKZW5kCgpydWxlIGFkZDEgbWF4QXV4CiAgKGFkZDEpLXByZXYgKG1heEF1eCktZmlyc3QgbWF4CiAgYWRkMSByZXN1bHQtKG1heEF1eCkKZW5kCgpjbGFpbSBvbmUgLS0gTmF0IGVuZApkZWZpbmUgb25lIHplcm8gYWRkMSBlbmQKCmNsYWltIHR3byAtLSBOYXQgZW5kCmRlZmluZSB0d28gb25lIGFkZDEgZW5kCgpjbGFpbSB0aHJlZSAtLSBOYXQgZW5kCmRlZmluZSB0aHJlZSB0d28gYWRkMSBlbmQKCmNsYWltIGZvdXIgLS0gTmF0IGVuZApkZWZpbmUgZm91ciB0aHJlZSBhZGQxIGVuZAoKemVybyB0d28gbWF4Cgp0aHJlZSB0d28gbWF4) - ``` type Nat -- @Type end @@ -770,9 +764,6 @@ This give us another good thing, i.e. composition of words is associative. Thus when we want to factor out a subsequence from a sequence of words, there will be no complicated syntax preventing us from doing so. -In the following examples, we will no longer using ASCII to draw graph, -to see the rendered graph, simply follow the link to the playground. - In the following code, we will use a syntax keyword `import`, to import definitions from other module. @@ -791,8 +782,6 @@ to a local variable named `local`. - After the fetching, `$local` will be empty again, and can be used to save other value. -[Goto the playground of `Nat` and `(mul)`](https://inet.run/playground/aW1wb3J0CiAgTmF0LCB6ZXJvLCBhZGQxLCBhZGQsCiAgb25lLCB0d28sIHRocmVlLApmcm9tICJodHRwczovL2NvZGUtb2YtaW5ldC1jdXRlLmZpZGIuYXBwL3Rlc3RzL2RhdGF0eXBlL05hdC5pIgoKbm9kZSBuYXRFcmFzZQogIE5hdCA6dGFyZ2V0IQogIC0tLS0tLS0tCmVuZAoKcnVsZSB6ZXJvIG5hdEVyYXNlIGVuZAoKcnVsZSBhZGQxIG5hdEVyYXNlCiAgKGFkZDEpLXByZXYgbmF0RXJhc2UKZW5kCgpub2RlIG5hdER1cAogIE5hdCA6dGFyZ2V0IQogIC0tLS0tLS0tCiAgTmF0IDpzZWNvbmQKICBOYXQgOmZpcnN0CmVuZAoKcnVsZSB6ZXJvIG5hdER1cAogIHplcm8gZmlyc3QtKG5hdER1cCkKICB6ZXJvIHNlY29uZC0obmF0RHVwKQplbmQKCnJ1bGUgYWRkMSBuYXREdXAKICAoYWRkMSktcHJldiBuYXREdXAgJGZpcnN0ICRzZWNvbmQKICBmaXJzdCBhZGQxIGZpcnN0LShuYXREdXApCiAgc2Vjb25kIGFkZDEgc2Vjb25kLShuYXREdXApCmVuZAoKbm9kZSBtdWwKICBOYXQgOnRhcmdldCEKICBOYXQgOm11bGVuZAogIC0tLS0tLS0tCiAgTmF0IDpyZXN1bHQKZW5kCgpydWxlIHplcm8gbXVsCiAgKG11bCktbXVsZW5kIG5hdEVyYXNlCiAgemVybyByZXN1bHQtKG11bCkKZW5kCgpydWxlIGFkZDEgbXVsCiAgKG11bCktbXVsZW5kIG5hdER1cCAkZmlyc3QgJHNlY29uZAogIChhZGQxKS1wcmV2IGZpcnN0IG11bCBzZWNvbmQgYWRkCiAgcmVzdWx0LShtdWwpCmVuZAoKdHdvIG5hdER1cCAkZmlyc3QgJHNlY29uZAoKdHdvIHR3byBtdWwKCnRocmVlIHRocmVlIG11bA) - ``` import Nat, zero, add1, add, @@ -860,8 +849,7 @@ we introduce the second simplest data -- `List`. The goal is to implement `append` function. -If you see the rendered graph in the playground, -you will find the `(append)` of `List` +The `(append)` of `List` is very similar to the `(add)` of `Nat`. The difference is that the `(add1)` of `Nat` only add one node, while the `(cons)` of `List` add one node and link to an extra node. @@ -878,8 +866,6 @@ to representing a type variable. This means when connecting the corresponding ports, this type variable must match the same type. -[Goto the playground of `List` and `(append)`](https://inet.run/playground/dHlwZSBMaXN0IEBUeXBlIC0tIEBUeXBlIGVuZAoKbm9kZSBudWxsCiAgLS0tLS0tLS0KICAnQSBMaXN0IDp2YWx1ZSEKZW5kCgpub2RlIGNvbnMKICAnQSA6aGVhZAogICdBIExpc3QgOnRhaWwKICAtLS0tLS0tLQogICdBIExpc3QgOnZhbHVlIQplbmQKCm5vZGUgYXBwZW5kCiAgJ0EgTGlzdCA6dGFyZ2V0IQogICdBIExpc3QgOnJlc3QKICAtLS0tLS0tLQogICdBIExpc3QgOnJlc3VsdAplbmQKCnJ1bGUgbnVsbCBhcHBlbmQKICAoYXBwZW5kKS1yZXN0CiAgcmVzdWx0LShhcHBlbmQpCmVuZAoKcnVsZSBjb25zIGFwcGVuZAogIChhcHBlbmQpLXJlc3QgKGNvbnMpLXRhaWwgYXBwZW5kCiAgKGNvbnMpLWhlYWQgY29ucwogIHJlc3VsdC0oYXBwZW5kKQplbmQKCmltcG9ydCB6ZXJvIGZyb20gImh0dHBzOi8vY29kZS1vZi1pbmV0LWN1dGUuZmlkYi5hcHAvdGVzdHMvZGF0YXR5cGUvTmF0LmkiCgpudWxsIHplcm8gY29ucyB6ZXJvIGNvbnMKbnVsbCB6ZXJvIGNvbnMgemVybyBjb25zCmFwcGVuZAoKbnVsbCB6ZXJvIGNvbnMgemVybyBjb25zCm51bGwgemVybyBjb25zIHplcm8gY29ucwphcHBlbmQgQHJ1biAkcmVzdWx0) - ``` type List @Type -- @Type end @@ -957,8 +943,6 @@ follows `@spread` to put all it's ports to the stack in reverse order of the definition, then we save the ports to local variables for later use. -[Goto the playground of `DiffList` and `(diffAppend)`](https://inet.run/playground/aW1wb3J0IExpc3QgZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9MaXN0LmkiCgp0eXBlIERpZmZMaXN0IEBUeXBlIC0tIEBUeXBlIGVuZAoKbm9kZSBkaWZmCiAgJ0EgTGlzdCA6ZnJvbnQKICAtLS0tLS0tCiAgJ0EgTGlzdCA6YmFjawogICdBIERpZmZMaXN0IDp2YWx1ZSEKZW5kCgpub2RlIGRpZmZBcHBlbmQKICAnQSBEaWZmTGlzdCA6dGFyZ2V0IQogICdBIERpZmZMaXN0IDpyZXN0CiAgLS0tLS0tLS0KICAnQSBEaWZmTGlzdCA6cmVzdWx0CmVuZAoKbm9kZSBkaWZmT3BlbgogICdBIERpZmZMaXN0IDp0YXJnZXQhCiAgJ0EgTGlzdCA6bmV3QmFjawogIC0tLS0tLS0tLS0KICAnQSBMaXN0IDpvbGRCYWNrCmVuZAoKcnVsZSBkaWZmIGRpZmZBcHBlbmQKICAoZGlmZiktZnJvbnQgZGlmZiByZXN1bHQtKGRpZmZBcHBlbmQpCiAgKGRpZmZBcHBlbmQpLXJlc3QgZGlmZk9wZW4gYmFjay0oZGlmZikKZW5kCgpydWxlIGRpZmYgZGlmZk9wZW4KICAoZGlmZiktYmFjayBuZXdCYWNrLShkaWZmT3BlbikKICAoZGlmZiktZnJvbnQgb2xkQmFjay0oZGlmZk9wZW4pCmVuZAoKaW1wb3J0IHplcm8gZnJv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diff --git "a/docs/articles/\345\217\215\345\272\224\347\275\221\347\274\226\347\250\213.md" "b/docs/articles/\345\217\215\345\272\224\347\275\221\347\274\226\347\250\213.md" index 7f16e07..7663334 100644 --- "a/docs/articles/\345\217\215\345\272\224\347\275\221\347\274\226\347\250\213.md" +++ "b/docs/articles/\345\217\215\345\272\224\347\275\221\347\274\226\347\250\213.md" @@ -392,10 +392,6 @@ end 在其中,我们还用了 `define` 来定义新词。 在使用 `define` 做定义之前,必须先用 `claim` 来声明一个词的类型。 -我们还有一个线上的演算场,可以用来方便地分享代码。 - -[去 `Nat` 与 `(add)` 的演算场](https://inet.run/playground/dHlwZSBOYXQgLS0gQFR5cGUgZW5kCgpub2RlIHplcm8KICAtLS0tLS0tLS0tLS0KICBOYXQgOnZhbHVlIQplbmQKCm5vZGUgYWRkMQogIE5hdCA6cHJldgogIC0tLS0tLS0tLS0tLQogIE5hdCA6dmFsdWUhCmVuZAoKbm9kZSBhZGQKICBOYXQgOnRhcmdldCEKICBOYXQgOmFkZGVuZAogIC0tLS0tLS0tLS0tLQogIE5hdCA6cmVzdWx0CmVuZAoKcnVsZSB6ZXJvIGFkZAogIChhZGQpLWFkZGVuZAogIHJlc3VsdC0oYWRkKQplbmQKCnJ1bGUgYWRkMSBhZGQKICAoYWRkKS1hZGRlbmQKICAoYWRkMSktcHJldiBhZGQKICBhZGQxIHJlc3VsdC0oYWRkKQplbmQKCmNsYWltIG9uZSAtLSBOYXQgZW5kCgpkZWZpbmUgb25lCiAgemVybyBhZGQxCmVuZAoKY2xhaW0gdHdvIC0tIE5hdCBlbmQKCmRlZmluZSB0d28KICBvbmUgYWRkMQplbmQKCmNsYWltIGFkZDIgTmF0IC0tIE5hdCBlbmQKCmRlZmluZSBhZGQyCiAgdHdvIGFkZAplbmQKCm9uZSBhZGQyCm9uZSBhZGQyCmFkZA) - ``` type Nat -- @Type end @@ -652,8 +648,6 @@ rule add1 maxAux end ``` -[去 `Nat` 与 `(max)` 的演算场](https://inet.run/playground/dHlwZSBOYXQgLS0gQFR5cGUgZW5kCgpub2RlIHplcm8KICAtLS0tLS0KICBOYXQgOnZhbHVlIQplbmQKCm5vZGUgYWRkMQogIE5hdCA6cHJldgogIC0tLS0tLS0tLS0KICBOYXQgOnZhbHVlIQplbmQKCm5vZGUgbWF4QXV4CiAgTmF0IDpmaXJzdAogIE5hdCA6c2Vjb25kIQogIC0tLS0tLS0tCiAgTmF0IDpyZXN1bHQKZW5kCgpub2RlIG1heAogIE5hdCA6Zmlyc3QhCiAgTmF0IDpzZWNvbmQKICAtLS0tLS0tLS0tCiAgTmF0IDpyZXN1bHQKZW5kCgpydWxlIHplcm8gbWF4CiAgKG1heCktc2Vjb25kIHJlc3VsdC0obWF4KQplbmQKCnJ1bGUgYWRkMSBtYXgKICAobWF4KS1zZWNvbmQgKGFkZDEpLXByZXYgbWF4QXV4CiAgcmVzdWx0LShtYXgpCmVuZAoKcnVsZSB6ZXJvIG1heEF1eAogIChtYXhBdXgpLWZpcnN0IGFkZDEKICByZXN1bHQtKG1heEF1eCkKZW5kCgpydWxlIGFkZDEgbWF4QXV4CiAgKGFkZDEpLXByZXYgKG1heEF1eCktZmlyc3QgbWF4CiAgYWRkMSByZXN1bHQtKG1heEF1eCkKZW5kCgpjbGFpbSBvbmUgLS0gTmF0IGVuZApkZWZpbmUgb25lIHplcm8gYWRkMSBlbmQKCmNsYWltIHR3byAtLSBOYXQgZW5kCmRlZmluZSB0d28gb25lIGFkZDEgZW5kCgpjbGFpbSB0aHJlZSAtLSBOYXQgZW5kCmRlZmluZSB0aHJlZSB0d28gYWRkMSBlbmQKCmNsYWltIGZvdXIgLS0gTmF0IGVuZApkZWZpbmUgZm91ciB0aHJlZSBhZGQxIGVuZAoKemVybyB0d28gbWF4Cgp0aHJlZSB0d28gbWF4) - ``` type Nat -- @Type end @@ -747,10 +741,6 @@ three two max 因此当我们想要把一串词中的一部分切分出来,定义成新的词时, 不用考虑那么多语法上相互影响的地方。 -下面我们就不用 ASCII 画图了, -点开去演算场的连接, -就可以看到自动渲染出来的图。 - 在下面的代码中,我们用了一个新的语法关键词 `import` 来从其他模块中引入定义。 - 一个文件对应一个模块。 @@ -763,8 +753,6 @@ three two max - 用 `$local` 保存一个值之后,可以通过调用 `local` 来取出这个值。 - 取出之后,`$local` 就空了,就又可以用于保存新的值了。 -[去 `Nat` 与 `(mul)` 的演算场](https://inet.run/playground/aW1wb3J0CiAgTmF0LCB6ZXJvLCBhZGQxLCBhZGQsCiAgb25lLCB0d28sIHRocmVlLApmcm9tICJodHRwczovL2NvZGUtb2YtaW5ldC1jdXRlLmZpZGIuYXBwL3Rlc3RzL2RhdGF0eXBlL05hdC5pIgoKbm9kZSBuYXRFcmFzZQogIE5hdCA6dGFyZ2V0IQogIC0tLS0tLS0tCmVuZAoKcnVsZSB6ZXJvIG5hdEVyYXNlIGVuZAoKcnVsZSBhZGQxIG5hdEVyYXNlCiAgKGFkZDEpLXByZXYgbmF0RXJhc2UKZW5kCgpub2RlIG5hdER1cAogIE5hdCA6dGFyZ2V0IQogIC0tLS0tLS0tCiAgTmF0IDpzZWNvbmQKICBOYXQgOmZpcnN0CmVuZAoKcnVsZSB6ZXJvIG5hdER1cAogIHplcm8gZmlyc3QtKG5hdER1cCkKICB6ZXJvIHNlY29uZC0obmF0RHVwKQplbmQKCnJ1bGUgYWRkMSBuYXREdXAKICAoYWRkMSktcHJldiBuYXREdXAgJGZpcnN0ICRzZWNvbmQKICBmaXJzdCBhZGQxIGZpcnN0LShuYXREdXApCiAgc2Vjb25kIGFkZDEgc2Vjb25kLShuYXREdXApCmVuZAoKbm9kZSBtdWwKICBOYXQgOnRhcmdldCEKICBOYXQgOm11bGVuZAogIC0tLS0tLS0tCiAgTmF0IDpyZXN1bHQKZW5kCgpydWxlIHplcm8gbXVsCiAgKG11bCktbXVsZW5kIG5hdEVyYXNlCiAgemVybyByZXN1bHQtKG11bCkKZW5kCgpydWxlIGFkZDEgbXVsCiAgKG11bCktbXVsZW5kIG5hdER1cCAkZmlyc3QgJHNlY29uZAogIChhZGQxKS1wcmV2IGZpcnN0IG11bCBzZWNvbmQgYWRkCiAgcmVzdWx0LShtdWwpCmVuZAoKdHdvIG5hdER1cCAkZmlyc3QgJHNlY29uZAoKdHdvIHR3byBtdWwKCnRocmVlIHRocmVlIG11bA) - ``` import Nat, zero, add1, add, @@ -832,8 +820,7 @@ three three mul 主要实现一个 `append` 函数,来将两个链表连接起来。 -在演算场中渲染出来的图中, -我们可以明显看到 `List` 的 `(append)` +`List` 的 `(append)` 与 `Nat` 的 `(add)` 非常相似。 差异是 `Nat` 的 `(add1)` 只是单纯地增加一个节点, 而 `List` 的 `(cons)` 在增加一个节点的同时, @@ -848,8 +835,6 @@ three three mul 在定义 `(cons)` 和 `(append)` 时,代表类型变元的相同的符号 `'A`,出现了多次。 这意味着在连接这些节点的接口时,这个类型变元必须匹配到相同的类型。 -[去 `List` 与 `(append)` 的演算场](https://inet.run/playground/dHlwZSBMaXN0IEBUeXBlIC0tIEBUeXBlIGVuZAoKbm9kZSBudWxsCiAgLS0tLS0tLS0KICAnQSBMaXN0IDp2YWx1ZSEKZW5kCgpub2RlIGNvbnMKICAnQSA6aGVhZAogICdBIExpc3QgOnRhaWwKICAtLS0tLS0tLQogICdBIExpc3QgOnZhbHVlIQplbmQKCm5vZGUgYXBwZW5kCiAgJ0EgTGlzdCA6dGFyZ2V0IQogICdBIExpc3QgOnJlc3QKICAtLS0tLS0tLQogICdBIExpc3QgOnJlc3VsdAplbmQKCnJ1bGUgbnVsbCBhcHBlbmQKICAoYXBwZW5kKS1yZXN0CiAgcmVzdWx0LShhcHBlbmQpCmVuZAoKcnVsZSBjb25zIGFwcGVuZAogIChhcHBlbmQpLXJlc3QgKGNvbnMpLXRhaWwgYXBwZW5kCiAgKGNvbnMpLWhlYWQgY29ucwogIHJlc3VsdC0oYXBwZW5kKQplbmQKCmltcG9ydCB6ZXJvIGZyb20gImh0dHBzOi8vY29kZS1vZi1pbmV0LWN1dGUuZmlkYi5hcHAvdGVzdHMvZGF0YXR5cGUvTmF0LmkiCgpudWxsIHplcm8gY29ucyB6ZXJvIGNvbnMKbnVsbCB6ZXJvIGNvbnMgemVybyBjb25zCmFwcGVuZAoKbnVsbCB6ZXJvIGNvbnMgemVybyBjb25zCm51bGwgemVybyBjb25zIHplcm8gY29ucwphcHBlbmQgQHJ1biAkcmVzdWx0) - ``` type List @Type -- @Type end @@ -921,8 +906,6 @@ append @run $result 后面跟着的 `@spread` 可以将其所有接口按定义中相反的顺序返回到栈中, 然后我们把这些接口保存到了一些局部变量中。 -[去 `DiffList` 与 `(diffAppend)` 的演算场](https://inet.run/playground/aW1wb3J0IExpc3QgZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtY3V0ZS5maWRiLmFwcC90ZXN0cy9kYXRhdHlwZS9MaXN0LmkiCgp0eXBlIERpZmZMaXN0IEBUeXBlIC0tIEBUeXBlIGVuZAoKbm9kZSBkaWZmCiAgJ0EgTGlzdCA6ZnJvbnQKICAtLS0tLS0tCiAgJ0EgTGlzdCA6YmFjawogICdBIERpZmZMaXN0IDp2YWx1ZSEKZW5kCgpub2RlIGRpZmZBcHBlbmQKICAnQSBEaWZmTGlzdCA6dGFyZ2V0IQogICdBIERpZmZMaXN0IDpyZXN0CiAgLS0tLS0tLS0KICAnQSBEaWZmTGlzdCA6cmVzdWx0CmVuZAoKbm9kZSBkaWZmT3BlbgogICdBIERpZmZMaXN0IDp0YXJnZXQhCiAgJ0EgTGlzdCA6bmV3QmFjawogIC0tLS0tLS0tLS0KICAnQSBMaXN0IDpvbGRCYWNrCmVuZAoKcnVsZSBkaWZmIGRpZmZBcHBlbmQKICAoZGlmZiktZnJvbnQgZGlmZiByZXN1bHQtKGRpZmZBcHBlbmQpCiAgKGRpZmZBcHBlbmQpLXJlc3QgZGlmZk9wZW4gYmFjay0oZGlmZikKZW5kCgpydWxlIGRpZmYgZGlmZk9wZW4KICAoZGlmZiktYmFjayBuZXdCYWNrLShkaWZmT3Blbik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ests/datatype/List.i"