OperationDeclaration

OperationDeclaration[type,op,typedfun]

type の操作 op に使う型付き関数を宣言する.

詳細

例題

  (1)

単一操作による製品型の宣言:

操作の宣言:

型の例を作成する関数と"Increment" 操作を呼び出す関数をコンパイルする:

例を作成する:

"Increment"操作を呼び出す.0というもとの値が返される:

"Increment"操作を再度呼び出す.今回は1という新しい値が返される:

Wolfram Research (2024), OperationDeclaration, Wolfram言語関数, https://reference.wolfram.com/language/ref/OperationDeclaration.html.

テキスト

Wolfram Research (2024), OperationDeclaration, Wolfram言語関数, https://reference.wolfram.com/language/ref/OperationDeclaration.html.

CMS

Wolfram Language. 2024. "OperationDeclaration." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/OperationDeclaration.html.

APA

Wolfram Language. (2024). OperationDeclaration. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/OperationDeclaration.html

BibTeX

@misc{reference.wolfram_2024_operationdeclaration, author="Wolfram Research", title="{OperationDeclaration}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/OperationDeclaration.html}", note=[Accessed: 18-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_operationdeclaration, organization={Wolfram Research}, title={OperationDeclaration}, year={2024}, url={https://reference.wolfram.com/language/ref/OperationDeclaration.html}, note=[Accessed: 18-November-2024 ]}