From d1fc1eb0ca4d41e9630c42c07d34646238233f5c Mon Sep 17 00:00:00 2001 From: Shunsuke Shibayama Date: Wed, 7 Sep 2022 23:32:41 +0900 Subject: [PATCH] Update hash --- doc/JA/API/modules/external/alstruct.md | 4 ++-- doc/JA/syntax/16_iterator.md | 2 +- doc/JA/syntax/type/03_trait.md | 2 +- doc/JA/syntax/type/15_quantified.md | 2 +- doc/JA/syntax/type/advanced/kind.md | 2 +- doc/zh_CN/API/modules/external/alstruct.md | 14 +++++++------- doc/zh_CN/syntax/16_iterator.md | 2 +- doc/zh_CN/syntax/type/03_trait.md | 2 +- doc/zh_CN/syntax/type/15_quantified.md | 2 +- doc/zh_CN/syntax/type/advanced/kind.md | 2 +- doc/zh_TW/API/modules/external/alstruct.md | 14 +++++++------- doc/zh_TW/syntax/16_iterator.md | 2 +- doc/zh_TW/syntax/type/03_trait.md | 2 +- doc/zh_TW/syntax/type/15_quantified.md | 2 +- doc/zh_TW/syntax/type/advanced/kind.md | 2 +- 15 files changed, 28 insertions(+), 28 deletions(-) diff --git a/doc/JA/API/modules/external/alstruct.md b/doc/JA/API/modules/external/alstruct.md index 70f194e4..1ae6f060 100644 --- a/doc/JA/API/modules/external/alstruct.md +++ b/doc/JA/API/modules/external/alstruct.md @@ -1,6 +1,6 @@ # alstruct -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/API/modules/external/alstruct.md%26commit_hash%3D06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/modules/external/alstruct.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/API/modules/external/alstruct.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/modules/external/alstruct.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 代数的構造を表すトレイトや、それにかかるパッチを提供するモジュール。 @@ -25,7 +25,7 @@ assert Nat.ReturnTypeof(Div) == Positive Ratio ```python SemiGroup Op: Kind 2 = Op(Self, Self) -IntIsSemiGroupAdd = Patch Int, Impl=SemiGroup Add +IntIsSemiGroupAdd = Patch Int, Impl := SemiGroup Add Int <: SemiGroup Add ``` diff --git a/doc/JA/syntax/16_iterator.md b/doc/JA/syntax/16_iterator.md index 03548a12..2e112977 100644 --- a/doc/JA/syntax/16_iterator.md +++ b/doc/JA/syntax/16_iterator.md @@ -1,6 +1,6 @@ # イテレータ -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/16_iterator.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/16_iterator.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/16_iterator.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/16_iterator.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) イテレータは、コンテナの要素を取り出すためのオブジェクトです。 diff --git a/doc/JA/syntax/type/03_trait.md b/doc/JA/syntax/type/03_trait.md index 7f1080b8..4a641ecc 100644 --- a/doc/JA/syntax/type/03_trait.md +++ b/doc/JA/syntax/type/03_trait.md @@ -1,6 +1,6 @@ # トレイト -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/03_trait.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/03_trait.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/03_trait.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/03_trait.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) トレイトは、レコード型に型属性の要求を追加した記名型です。 Pythonでいう抽象基底クラス(Abstract Base Class, ABC)に類似しますが、代数的演算を行えるという特徴があります。 diff --git a/doc/JA/syntax/type/15_quantified.md b/doc/JA/syntax/type/15_quantified.md index 7f5c4bce..3ba6223b 100644 --- a/doc/JA/syntax/type/15_quantified.md +++ b/doc/JA/syntax/type/15_quantified.md @@ -1,6 +1,6 @@ # 型変数(Type Variable)、量化型 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/15_quantified.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/15_quantified.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/15_quantified.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/15_quantified.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 型変数はサブルーチン引数の型指定などに使用する変数で、その型が任意である(単相化しない)ことを示します。 まず、型変数を導入するモチベーションとして、入力をそのまま返す`id`関数について考えましょう。 diff --git a/doc/JA/syntax/type/advanced/kind.md b/doc/JA/syntax/type/advanced/kind.md index a5590e79..8421b894 100644 --- a/doc/JA/syntax/type/advanced/kind.md +++ b/doc/JA/syntax/type/advanced/kind.md @@ -1,6 +1,6 @@ # カインド(Kind) -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/advanced/kind.md%26commit_hash%3D06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/advanced/kind.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/advanced/kind.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/advanced/kind.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) Ergでは全てが型付けられている。型自体も例外ではない。「型の型」を表すのが __カインド(種)__ である。例えば`1`が`Int`に属しているように、`Int`は`Type`に属している。`Type`は最もシンプルなカインドである __原子カインド(Atomic kind)__ である。型理論的の記法では、`Type`は`*`に対応する。 diff --git a/doc/zh_CN/API/modules/external/alstruct.md b/doc/zh_CN/API/modules/external/alstruct.md index bf8dd4f5..6e02f43e 100644 --- a/doc/zh_CN/API/modules/external/alstruct.md +++ b/doc/zh_CN/API/modules/external/alstruct.md @@ -1,12 +1,12 @@ # 结构 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/API/modules/external/alstruct.md%26commit_hash%3D06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/modules/external/alstruct.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/API/modules/external/alstruct.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/modules/external/alstruct.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 模块为它们提供代表代数结构和补丁的特征 * 成员 -## 二进制运算 +## BinOp(二进制运算) ```python BinOp Op: Kind 2 = Subsume Op(Self, Self.ReturnTypeOf Op), Additional: { @@ -20,7 +20,7 @@ assert Nat. ReturnTypeof(Mul) == Nat assert Nat.ReturnTypeof(Div) == Positive Ratio ``` -## 半群(一个二元运算的代数系统) +## SemiGroup(半群) ```python SemiGroup Op: Kind 2 = Op(Self, Self) @@ -30,7 +30,7 @@ IntIsSemiGroupAdd = Patch Int, Impl=SemiGroupAdd Int <: SemiGroup Add ``` -## 函子 +## Functor(函子) ```python # * Identity law: x.map(id) == x @@ -40,7 +40,7 @@ Functor = Trait { } ``` -## 应用 +## Applicative(应用) ```python # * Identity law: x.app(X.pure(id)) == x @@ -50,10 +50,10 @@ Applicative = Subsume Functor, Additional: { } ``` -## 单子(交互式命令行工具以及面向对象的脚本技术) +## Monad(单子) ```python Monad = Subsume Applicative, Additional: { .bind|T, U: Type| = (Self(T), T -> Self U) -> Self U } -``` \ No newline at end of file +``` diff --git a/doc/zh_CN/syntax/16_iterator.md b/doc/zh_CN/syntax/16_iterator.md index 1067ac3a..011158fc 100644 --- a/doc/zh_CN/syntax/16_iterator.md +++ b/doc/zh_CN/syntax/16_iterator.md @@ -1,6 +1,6 @@ # 迭代器 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/16_iterator.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/16_iterator.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/16_iterator.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/16_iterator.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 迭代器是用于检索容器元素的对象。 diff --git a/doc/zh_CN/syntax/type/03_trait.md b/doc/zh_CN/syntax/type/03_trait.md index b9d53bcb..30c13649 100644 --- a/doc/zh_CN/syntax/type/03_trait.md +++ b/doc/zh_CN/syntax/type/03_trait.md @@ -1,6 +1,6 @@ # 特质 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/03_trait.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/03_trait.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/03_trait.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/03_trait.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) Trait 是一种名义类型,它将类型属性要求添加到记录类型。 它类似于 Python 中的抽象基类 (ABC),但区别在于能够执行代数运算。 diff --git a/doc/zh_CN/syntax/type/15_quantified.md b/doc/zh_CN/syntax/type/15_quantified.md index edc3c0f7..d623d2d3 100644 --- a/doc/zh_CN/syntax/type/15_quantified.md +++ b/doc/zh_CN/syntax/type/15_quantified.md @@ -1,6 +1,6 @@ # 类型变量,量化类型 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/15_quantified.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/15_quantified.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/15_quantified.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/15_quantified.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 类型变量是用于例如指定子程序参数类型的变量,它的类型是任意的(不是单态的)。 首先,作为引入类型变量的动机,考虑 `id` 函数,它按原样返回输入。 diff --git a/doc/zh_CN/syntax/type/advanced/kind.md b/doc/zh_CN/syntax/type/advanced/kind.md index c539970a..e1efd460 100644 --- a/doc/zh_CN/syntax/type/advanced/kind.md +++ b/doc/zh_CN/syntax/type/advanced/kind.md @@ -1,6 +1,6 @@ # Kind -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/advanced/kind.md%26commit_hash%3D06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/advanced/kind.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/advanced/kind.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/advanced/kind.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 一切都在 Erg 中输入。类型本身也不例外。 __kind__ 表示“类型的类型”。例如,`Int` 属于 `Type`,就像 `1` 属于 `Int`。 `Type` 是最简单的一种,__atomic kind__。在类型论符号中,`Type` 对应于 `*`。 diff --git a/doc/zh_TW/API/modules/external/alstruct.md b/doc/zh_TW/API/modules/external/alstruct.md index ff5b14f4..53369c25 100644 --- a/doc/zh_TW/API/modules/external/alstruct.md +++ b/doc/zh_TW/API/modules/external/alstruct.md @@ -1,12 +1,12 @@ # 結構 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/API/modules/external/alstruct.md%26commit_hash%3D06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/modules/external/alstruct.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/API/modules/external/alstruct.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/API/modules/external/alstruct.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 模塊為它們提供代表代數結構和補丁的特征 * 成員 -## 二進制運算 +## 二進制運算(BinOp) ```python BinOp Op: Kind 2 = Subsume Op(Self, Self.ReturnTypeOf Op), Additional: { @@ -20,7 +20,7 @@ assert Nat. ReturnTypeof(Mul) == Nat assert Nat.ReturnTypeof(Div) == Positive Ratio ``` -## 半群(一個二元運算的代數系統) +## 半群(SemiGroup) ```python SemiGroup Op: Kind 2 = Op(Self, Self) @@ -30,7 +30,7 @@ IntIsSemiGroupAdd = Patch Int, Impl=SemiGroupAdd Int <: SemiGroup Add ``` -## 函子 +## 函子(Functor) ```python # * Identity law: x.map(id) == x @@ -40,7 +40,7 @@ Functor = Trait { } ``` -## 應用 +## 應用(Applicative) ```python # * Identity law: x.app(X.pure(id)) == x @@ -50,10 +50,10 @@ Applicative = Subsume Functor, Additional: { } ``` -## 單子(交互式命令行工具以及面向對象的腳本技術) +## 單子(Monad) ```python Monad = Subsume Applicative, Additional: { .bind|T, U: Type| = (Self(T), T -> Self U) -> Self U } -``` \ No newline at end of file +``` diff --git a/doc/zh_TW/syntax/16_iterator.md b/doc/zh_TW/syntax/16_iterator.md index 0482f9eb..d721d51f 100644 --- a/doc/zh_TW/syntax/16_iterator.md +++ b/doc/zh_TW/syntax/16_iterator.md @@ -1,6 +1,6 @@ # 迭代器 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/16_iterator.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/16_iterator.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/16_iterator.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/16_iterator.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 迭代器是用于檢索容器元素的對象。 diff --git a/doc/zh_TW/syntax/type/03_trait.md b/doc/zh_TW/syntax/type/03_trait.md index 41bb6922..a49dd3f2 100644 --- a/doc/zh_TW/syntax/type/03_trait.md +++ b/doc/zh_TW/syntax/type/03_trait.md @@ -1,6 +1,6 @@ # 特質 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/03_trait.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/03_trait.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/03_trait.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/03_trait.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) Trait 是一種名義類型,它將類型屬性要求添加到記錄類型。 它類似于 Python 中的抽象基類 (ABC),但區別在于能夠執行代數運算。 diff --git a/doc/zh_TW/syntax/type/15_quantified.md b/doc/zh_TW/syntax/type/15_quantified.md index 2a27db12..4928af54 100644 --- a/doc/zh_TW/syntax/type/15_quantified.md +++ b/doc/zh_TW/syntax/type/15_quantified.md @@ -1,6 +1,6 @@ # 類型變量,量化類型 -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/15_quantified.md%26commit_hash%3D51de3c9d5a9074241f55c043b9951b384836b258)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/15_quantified.md&commit_hash=51de3c9d5a9074241f55c043b9951b384836b258) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/15_quantified.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/15_quantified.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 類型變量是用于例如指定子程序參數類型的變量,它的類型是任意的(不是單態的)。 首先,作為引入類型變量的動機,考慮 `id` 函數,它按原樣返回輸入。 diff --git a/doc/zh_TW/syntax/type/advanced/kind.md b/doc/zh_TW/syntax/type/advanced/kind.md index 09bab961..2cfcef77 100644 --- a/doc/zh_TW/syntax/type/advanced/kind.md +++ b/doc/zh_TW/syntax/type/advanced/kind.md @@ -1,6 +1,6 @@ # Kind -[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/advanced/kind.md%26commit_hash%3D06f8edc9e2c0cee34f6396fd7c64ec834ffb5352)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/advanced/kind.md&commit_hash=06f8edc9e2c0cee34f6396fd7c64ec834ffb5352) +[![badge](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fgezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com%2Fdefault%2Fsource_up_to_date%3Fowner%3Derg-lang%26repos%3Derg%26ref%3Dmain%26path%3Ddoc/EN/syntax/type/advanced/kind.md%26commit_hash%3D14657486719a134f494e107774ac8f9d5a63f083)](https://gezf7g7pd5.execute-api.ap-northeast-1.amazonaws.com/default/source_up_to_date?owner=erg-lang&repos=erg&ref=main&path=doc/EN/syntax/type/advanced/kind.md&commit_hash=14657486719a134f494e107774ac8f9d5a63f083) 一切都在 Erg 中輸入。類型本身也不例外。 __kind__ 表示“類型的類型”。例如,`Int` 屬于 `Type`,就像 `1` 屬于 `Int`。 `Type` 是最簡單的一種,__atomic kind__。在類型論符號中,`Type` 對應于 `*`。