モナド (プログラミング)とは? わかりやすく解説

Weblio 辞書 > 辞書・百科事典 > 百科事典 > モナド (プログラミング)の意味・解説 

モナド (プログラミング)

出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2023/07/23 23:27 UTC 版)

関数型プログラミングにおいて、モナドはプログラムを構造化するための汎用的な抽象概念である。対応したプログラム言語では、ボイラープレート的なコードでもモナドを使って除去することが可能となる。これはモナドが、特定の形をした計算を表すデータ型と、それに関する生成と合成の2つの手続きを提供することによって実現されている。生成は任意の基本型の値をモナドに包んでモナド値を生成する手続きであり、合成はモナド値を返す関数(モナド関数)たちを合成する手続きである。[1]


注釈

  1. ^ プログラミングにおいては複数の自由変数上の関数が使われるため、正確にはここでいうモナドは圏論における強モナドである。[3]
  2. ^ 技術的には、モナドは元となる型を保存する必要はない。例えば、全ての演算子がただひとつの多相な値を返すような自明なモナドもモナドの公理を満たす。逆に、モナドは新しい構造を追加する必要はない。元の型を変更せずそのままとする恒等モナドはモナドの公理を満たし、モナド変換子の再帰の基点として有用である。
  3. ^ この名前は後述する do 記法での使われ方から来ている。

出典

  1. ^ a b c d O'Sullivan, Bryan; Goerzen, John; Stewart, Don (2009). “Monads”. Real World Haskell. Sebastopol, California: O'Reilly Media. chapter 14. ISBN 978-0596514983. http://book.realworldhaskell.org/read/monads.html 
  2. ^ Wadler, Philip (June 1990). Comprehending Monads. ACM Conference on LISP and Functional Programming. Nice, France. CiteSeerX 10.1.1.33.5381
  3. ^ a b Moggi, Eugenio (1991). “Notions of computation and monads”. Information and Computation 93 (1): 55–92. doi:10.1016/0890-5401(91)90052-4. http://www.disi.unige.it/person/MoggiE/ftp/ic91.pdf. 
  4. ^ Wadler, Philip (January 1992). The essence of functional programming. 19th Annual ACM Symposium on Principles of Programming Languages. Albuquerque, New Mexico. CiteSeerX 10.1.1.38.9516
  5. ^ Hudak, Paul; Peterson, John; Fasel, Joseph (1999). “About Monads”. A Gentle Introduction to Haskell 98. chapter 9. https://www.haskell.org/tutorial/monads.html 
  6. ^ Moggi, Eugenio (1991). “Notions of computation and monads”. Information and Computation 93 (1). doi:10.1016/0890-5401(91)90052-4. http://www.disi.unige.it/person/MoggiE/ftp/ic91.pdf. 
  7. ^ Some Details on F# Computation Expressions”. 2007年12月14日閲覧。
  8. ^ Peyton Jones, Simon L.; Wadler, Philip. Imperative Functional Programming. Conference record of the Twentieth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Charleston, South Carolina. 1993
  9. ^ A monad is a triple (M, unit,>>=) consisting of a type constructor M and two operations of the following types Tomas Petricek (2018) What we talk about when we talk about monads. The Art, Science, and Engineering of Programming, 2018, Vol. 2, Issue 3, Article 12. [1]
  10. ^ The monad type constructor m is added to function results (modulo currying) and nowhere else. Hackage. Control.Monad [2]
  11. ^ The >>= operator is known as bind Tomas Petricek (2018) What we talk about when we talk about monads. The Art, Science, and Engineering of Programming, 2018, Vol. 2, Issue 3, Article 12. [3]
  12. ^ Monad laws”. HaskellWiki. haskell.org. 2011年12月11日閲覧。
  13. ^ Functors, Applicative Functors and Monoids”. learnyouahaskell.com. 2015年2月21日閲覧。
  14. ^ How to make Data.Set a monad shows an implementation of the Set restricted monad in Haskell



「モナド (プログラミング)」の例文・使い方・用例・文例

Weblio日本語例文用例辞書はプログラムで機械的に例文を生成しているため、不適切な項目が含まれていることもあります。ご了承くださいませ。


英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「モナド (プログラミング)」の関連用語

モナド (プログラミング)のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



モナド (プログラミング)のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
ウィキペディアウィキペディア
All text is available under the terms of the GNU Free Documentation License.
この記事は、ウィキペディアのモナド (プログラミング) (改訂履歴)の記事を複製、再配布したものにあたり、GNU Free Documentation Licenseというライセンスの下で提供されています。 Weblio辞書に掲載されているウィキペディアの記事も、全てGNU Free Documentation Licenseの元に提供されております。
Tanaka Corpusのコンテンツは、特に明示されている場合を除いて、次のライセンスに従います:
 Creative Commons Attribution (CC-BY) 2.0 France.
この対訳データはCreative Commons Attribution 3.0 Unportedでライセンスされています。
浜島書店 Catch a Wave
Copyright © 1995-2024 Hamajima Shoten, Publishers. All rights reserved.
株式会社ベネッセコーポレーション株式会社ベネッセコーポレーション
Copyright © Benesse Holdings, Inc. All rights reserved.
研究社研究社
Copyright (c) 1995-2024 Kenkyusha Co., Ltd. All rights reserved.
日本語WordNet日本語WordNet
日本語ワードネット1.1版 (C) 情報通信研究機構, 2009-2010 License All rights reserved.
WordNet 3.0 Copyright 2006 by Princeton University. All rights reserved. License
日外アソシエーツ株式会社日外アソシエーツ株式会社
Copyright (C) 1994- Nichigai Associates, Inc., All rights reserved.
「斎藤和英大辞典」斎藤秀三郎著、日外アソシエーツ辞書編集部編
EDRDGEDRDG
This page uses the JMdict dictionary files. These files are the property of the Electronic Dictionary Research and Development Group, and are used in conformance with the Group's licence.

©2024 GRAS Group, Inc.RSS