Shulk
Introduction Get startedBasics
Tagged unions Pattern matchingMonads
Result Maybe LoadingAsync
Procedure ConcurrentlyOthers
WrappersProcedure
Pipelining is nice
Using Shulk’s Result
and Maybe
monads, you can write your code using nice pipelines, where the output of a function is the input of the next one.
A problem you will encounter is that after an async call, you’ll have to await the result and continue your pipeline after that.
The solution: Use Procedure
With Shulk’s Procedure, you can create a pipeline of Result returning Promises, using a nice builder pattern.
You don’t have to await anything, everything is executed when you call the end()
method.
Sequences are executed one after another and with the parallelize
method you can execute multiple async functions concurrently.