Thanks for this comprehensive summary.
I looked at ChatGBT for DRY::Monads. The answer focuses mostly on aspects of functional programming. Then I understood, why you used the unusual A.new.call approach in your examples.
I translated your first example to (to me) familar ruby
classAuthextendDry::Monads[:result]defself.authenticatenamename=='correct'?Success(name: name):Failure(error: "No such User")endendr=A.authenticate('somone')r.success?
Now the approach behaves much more like a state machine then a variation of error-handling.
does work. However, the returnstatement is not needed.
If you try the example without it and run into Failure, the statement Runner.new.callsimply returns the Dry::Monad::Result::Failure object.
Check it out!
Hi, I’m Kudzai — a passionate African tech builder, full-stack developer, and digital problem-solver.
I create modern applications that make life easier for real people.
Olá, eu sou o Ilo, apaixonado por webdev, com anos de carreira, mas jr/pl em React/NextJS, gosto de aprender, discutir e, quando sei, ensinar.
Sou membro da He4rt Developers.
Thanks for this comprehensive summary.
I looked at ChatGBT for DRY::Monads. The answer focuses mostly on aspects of functional programming. Then I understood, why you used the unusual
A.new.callapproach in your examples.I translated your first example to (to me) familar ruby
Now the approach behaves much more like a state machine then a variation of error-handling.
A second observation.
your example
does work. However, the
returnstatement is not needed.If you try the example without it and run into Failure, the statement
Runner.new.callsimply returns the Dry::Monad::Result::Failure object.Check it out!
I honestly prefer the return for legibility reason, but it's cool if we don't need it
Amazing incrementing to this article! Thanks a lot
Qualidade demais Cherry👏👏👏
Muito obrigada primo!
Excellent article! It's always amazing to read!
Thanks for the kind words cousin <3
Didática e conteúdos muito bons!!!! Manda demais prima!!
Mto obrigada primo <3
Faço um uso parecido no TS com o effect, fica lindo demais
Uma das inspirações foram essas implementações no typescript, não conheço explicitamente o effect, mas realmente funciona super bem
muito brabo!
Well Explained hey ! Excellent
Thanks a lot 🩷
Show!
Cualidad!
ty <3
Amazing, the queen of vim!
Thanks a lot cousin <3
Excellent article. Thanks a good article shared with us. witchcraft love spells
Sá salvei pra ler mais tarde, muito bom o conteúdo!!
Muito obrigada primo
Nice article.
Ty <3
Cherry... você é sensacional, prima <3
O que eu puder fazer por todo mundo é sempre um prazer, brigada pelo apoio primo