Advertisement
Guest User

Untitled

a guest
Nov 12th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. One example of something with monadic behavior would be a type of "list" that has the following:
  2.  
  3. - TYPE CONSTRUCTOR: This is just a basic constructor to make a "list" of type "T" without specific input.
  4.  
  5. - TYPE CONVERTER: A "list" of type "T" can be constructed from just a "T" (or maybe a bunch of "T"s). So you're
  6. converting a "T" into a "list" of "T".
  7.  
  8. - COMBINATOR: You can perform an operation on all "T"s in the "list" by invoking that operation on the list
  9. itself.
  10.  
  11. Things that are monadic:
  12. - nullable values
  13. - list comprehension
  14. - async / await
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement