Brian Mearns
Mar 2, 2021

Interesting approach and nice article. As some other comments have mentioned, this is similar to the Either pattern. Another you might be interested in is the Try type pattern. It originates (I think) from scala, but it can be implemented pretty easily in any language (such as my implementation of it for javascript on npm, "fp-try").

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Brian Mearns
Brian Mearns

Written by Brian Mearns

Software Engineer since 2007 ・ Parent ・ Mediocre Runner ・ Flower and Tree Enthusiast ・ Crappy Wood Worker ・ he/him or they/them

No responses yet

Write a response