diff --git a/README.md b/README.md index be361cd..68e550a 100644 --- a/README.md +++ b/README.md @@ -135,10 +135,10 @@ eval @inspect(sixSoles()) ### DiffList -[ [Goto The Playground](https://inet.xieyuheng.com/playground/aW1wb3J0IHsgTGlzdCB9IGZyb20gImh0dHBzOi8vY29kZS1vZi1pbmV0LWpzLmZpZGIuYXBwL3N0ZC9kYXRhdHlwZS9MaXN0LmkiCgovLyBDb25jYXRlbmF0aW9uIG9mIGxpc3RzIGlzIHBlcmZvcm1lZCBpbiBsaW5lYXIgdGltZQovLyB3aXRoIHJlc3BlY3QgdG8gaXRzIGZpcnN0IGFyZ3VtZW50LgovLyBDb25zdGFudCB0aW1lIGNvbmNhdGVuYXRpb24gaXMgcG9zc2libGUKLy8gd2l0aCBkaWZmZXJlbmNlLWxpc3RzOiB0aGUgaWRlYSBjb25zaXN0cyBpbgovLyBwbHVnZ2luZyB0aGUgZnJvbnQgb2YgdGhlIHNlY29uZCBhcmd1bWVudAovLyBhdCB0aGUgYmFjayBvZiB0aGUgZmlyc3Qgb25lLgoKdHlwZSBEaWZmTGlzdChFbGVtZW50OiBAVHlwZSkKCm5vZGUgZGlmZigKICBmcm9udDogTGlzdCgnQSksCiAgLS0tLS0tLQogIGJhY2s6IExpc3QoJ0EpLAogIHZhbHVlITogRGlmZkxpc3QoJ0EpLAopCgpub2RlIGRpZmZBcHBlbmQoCiAgdGFyZ2V0ITogRGlmZkxpc3QoJ0EpLAogIHJlc3Q6IERpZmZMaXN0KCdBKQogIC0tLS0tLS0tCiAgcmVzdWx0OiBEaWZmTGlzdCgnQSkKKQoKbm9kZSBkaWZmT3BlbigKICB0YXJnZXQhOiBEaWZmTGlzdCgnQSksCiAgbmV3QmFjazogTGlzdCgnQSkKICAtLS0tLS0tLS0tCiAgb2xkQmFjazogTGlzdCgnQSkKKQoKcnVsZSBkaWZmQXBwZW5kKHRhcmdldCEsIHJlc3QsIHJlc3VsdCkKICAgICBkaWZmKGZyb250LCBiYWNrLCB2YWx1ZSE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mVjdChiYWNrLCBuZXdCYWNrKQogIEBjb25uZWN0KGZyb250LCBvbGRCYWNrKQp9CgovLyBURVNUCgppbXBvcnQgeyBjb25zIH0gZnJvbSAiaHR0cHM6Ly9jb2RlLW9mLWluZXQtanMueGlleXVoZW5nLmNvbS9kb2NzL3N0ZC9kYXRhdHlwZS9MaXN0LmkiCgp0eXBlIFRyaXZpYWwKCm5vZGUgc29sZSgtLSB2YWx1ZSE6IFRyaXZpYWwpCgpmdW5jdGlvbiB0d29Ud29Tb2xlcygpOiBEaWZmTGlzdChUcml2aWFsKSB7CiAgbGV0IGZyb250LCBiYWNrLCB2YWx1ZTEgPSBkaWZmKCkKICBAY29ubmVjdChmcm9udCwgY29ucyhzb2xlKCksIGNvbnMoc29sZSgpLCBiYWNrKSkpCiAgbGV0IGZyb250LCBiYWNrLCB2YWx1ZTIgPSBkaWZmKCkKICBAY29ubmVjdChmcm9udCwgY29ucyhzb2xlKCksIGNvbnMoc29sZSgpLCBiYWNrKSkpCiAgcmV0dXJuIGRpZmZBcHBlbmQodmFsdWUxLCB2YWx1ZTIpCn0KCmV2YWwgQGluc3BlY3QoQHJ1bih0d29Ud29Tb2xlcygpKSkKZXZhbCBAaW5zcGVjdCh0d29Ud29Tb2xlcygpKQ) ] ```inet -import { List } from "https://code-of-inet-js.xieyuheng.com/std/datatype/List.i" +import { List } from "https://code-of-inet-js.xieyuheng.com/docs/std/datatype/List.i" // Concatenation of lists is performed in linear time // with respect to its first argument. @@ -185,7 +185,7 @@ rule diffOpen(target!, newBack, oldBack) // TEST -import { cons } from "https://code-of-inet-js.xieyuheng.com/std/datatype/List.i" +import { cons } from "https://code-of-inet-js.xieyuheng.com/docs/std/datatype/List.i" type Trivial