loading...

re: The Maybe data type in JavaScript VIEW POST

TOP OF THREAD FULL DISCUSSION
re: If we want to mix Maybe/Either with asynchronous API fetches, there's a functional data type that's perfect for that, Task (also known as Futures)....
 

Thanks Drew for your answer. Indeed your example looks interesting.

Do you happen to have any more resources online on the subject? Like maybe some more open-source code and videos? I'm afraid most of the readers out there won't be able to pay the price necessary to unlock the whole course and grab the sources out of this video.

 

I wrote a couple of Medium articles way back on this stuff. For instance, here's my piece on Maybe:
medium.com/@dtipson/getting-someth...

And this gist extends some of the Task stuff (using a constructor with a prototype is still the way to go with these, but using just straight functions is often a simpler way to explain the concepts, imo) gist.github.com/dtipson/01fba81f3b...

 

The course (called Professor Frisby Introduces Composable Functional JavaScript) is actually free, you just need to enter your email address. Yes, you have to pay for the source code, but if you follow the course from the beginning it might not even be necessary, you can code while watching.

I'd recommend watching the whole course, even without coding along, because it's awesome, really.

Brian has also published a book about functional programming in JS, and it is freely available on Gitbook.

Thanks for your answer. I'll look into that. The book looks great.

Code of Conduct Report abuse