Say I'm creating an image processing library using Haskell. I have defined several of my own data types.
When should I declare some of my data types as Monad (or functor or application functor, etc.)? And what is the use of this?
I understand that if some data types can be "mapped", I can declare it an instance of a functor. But if I do so, then what is the use?
This may be a really stupid question, but I'm still trying to get into the field of functional programming.
, OO; , , , .
, - Monad, , , . , , , , , , ; , , .
/ Monad, , , , . , , Monads, , , , Monad. , OO; OO, , , , , OO . , - - , , , .
- , . Haskell, , . , .
Source: https://habr.com/ru/post/1534719/More articles:I am familiar with Ruby / DL, but not sure how to use C function calls with pointers for returned parameters - cCustom Polymer Element Extending AElement in Dart - dartHow to install gwtbootstrap3? - gwtHow to find an element that does not have an identifier, name, class, attribute, etc.? - javascriptCreating a unique unique list - javaAlarmy app can play iTunes song from background ... How? - iosto make an asynchronous xml request from Firefox admin - javascriptDo not find libraries for JRI - javaWhy does the Oracle JDK (8, 7 and below?) Disregard LC_ * environment variables? - javaHow to get the current date in a file name? - reporting-servicesAll Articles