Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Eric Torreborre
The Eff monad
One monad to
rule them all!
It must be evident how multifarious
and how mutually complicated are
the considerations which the working
of such an engin...
You could have
invented monads!
Exceptions?
Exceptions?
State?
State?
Genius!
Can we have both state and error?
First idea: stack them!
1996!
Which order?
DOES NOT WORK!
THIS ONE WORKS!
DIFFERENCE?
DIFFERENCE?
DIFFERENCE?
ORDER IS
IMPORTANT!
GENERALISE
STACKING HAS A COST!
SIMILAR EFFECTS?
IN PRACTICE
Specialized stacks
Specialized functions
WHAT IF?
We need to use both Hadoop and S3?
WHAT ELSE?
WHAT ELSE?
Type-
level
effects
Eff monad
Value-
level
effects
Continuatio
nsInterpreters
Member
typeclass
Effect
Type-level
effects
Value-level
effects
Value-level
effect
Continuations
Option
Interpreter
State
Interpreter
Continuation1
Continuation2
Option
Interpreter
Continuation3 +
State
Interpreter
OPTION RELOADED
KLEISLI
OPTION AS EFFECT
EFF
ERROR AS EFFECT
NEVER RE-IMPLEMENT
flatMap
EVER AGAIN!
EFFECTS UNITE!
Type-level
effects
Value-level
effects
Value-level
effects
Member
typeclass
LIBRARY
scalaz.Future
STACKOVERFLOW
:-(
STACK SAFE
TRANSFORM
EFFECTS
SO, SILVER
BULLET?
SORRY
NO
Implicits
Implicits
Use it in prod'
Renamings
Check laws
Missing functions
Benchmarking, Scalajs...
CREDITS
LINKS
Monads for functional programming
Monad transformers and modular interpreters
Extensible effects
Reflection without ...
THANKS!
Matchers
Matchers
Matchers
Matchers
MORE
TROUBLE
List(5, 7, 1)
TOO BIG?
ONE MORE ERROR LAYER!
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
The Eff monad, one monad to rule them all
Upcoming SlideShare
Loading in …5
×

The Eff monad, one monad to rule them all

4,735 views

Published on

The Eff monad is an alternative to monad transformers. It is implemented as a library in https://github.com/atnos-org/eff-cats and https://github.com/atnos-org/eff-scalaz

Published in: Technology
  • Dating for everyone is here: ♥♥♥ http://bit.ly/36cXjBY ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/36cXjBY ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

The Eff monad, one monad to rule them all

  1. 1. Eric Torreborre The Eff monad One monad to rule them all!
  2. 2. It must be evident how multifarious and how mutually complicated are the considerations which the working of such an engine involve. There are frequently several distinct sets of effects going on simultaneously; all in a manner independent of each other, and yet to a greater or less degree exercising a mutual influence. Ada Lovelace, 1842
  3. 3. You could have invented monads!
  4. 4. Exceptions?
  5. 5. Exceptions?
  6. 6. State?
  7. 7. State?
  8. 8. Genius!
  9. 9. Can we have both state and error?
  10. 10. First idea: stack them!
  11. 11. 1996!
  12. 12. Which order?
  13. 13. DOES NOT WORK!
  14. 14. THIS ONE WORKS!
  15. 15. DIFFERENCE?
  16. 16. DIFFERENCE?
  17. 17. DIFFERENCE?
  18. 18. ORDER IS IMPORTANT!
  19. 19. GENERALISE
  20. 20. STACKING HAS A COST!
  21. 21. SIMILAR EFFECTS?
  22. 22. IN PRACTICE
  23. 23. Specialized stacks
  24. 24. Specialized functions
  25. 25. WHAT IF? We need to use both Hadoop and S3?
  26. 26. WHAT ELSE?
  27. 27. WHAT ELSE?
  28. 28. Type- level effects Eff monad Value- level effects Continuatio nsInterpreters Member typeclass
  29. 29. Effect
  30. 30. Type-level effects Value-level effects
  31. 31. Value-level effect Continuations
  32. 32. Option Interpreter State Interpreter Continuation1 Continuation2 Option Interpreter Continuation3 + State Interpreter
  33. 33. OPTION RELOADED
  34. 34. KLEISLI
  35. 35. OPTION AS EFFECT
  36. 36. EFF
  37. 37. ERROR AS EFFECT
  38. 38. NEVER RE-IMPLEMENT flatMap EVER AGAIN!
  39. 39. EFFECTS UNITE!
  40. 40. Type-level effects
  41. 41. Value-level effects
  42. 42. Value-level effects
  43. 43. Member typeclass
  44. 44. LIBRARY
  45. 45. scalaz.Future
  46. 46. STACKOVERFLOW :-(
  47. 47. STACK SAFE
  48. 48. TRANSFORM EFFECTS
  49. 49. SO, SILVER BULLET?
  50. 50. SORRY NO
  51. 51. Implicits
  52. 52. Implicits Use it in prod' Renamings Check laws Missing functions Benchmarking, Scalajs...
  53. 53. CREDITS
  54. 54. LINKS Monads for functional programming Monad transformers and modular interpreters Extensible effects Reflection without remorse Freer monad, more extensible effects
  55. 55. THANKS!
  56. 56. Matchers
  57. 57. Matchers
  58. 58. Matchers
  59. 59. Matchers
  60. 60. MORE TROUBLE
  61. 61. List(5, 7, 1)
  62. 62. TOO BIG?
  63. 63. ONE MORE ERROR LAYER!

×