January 2018
Beginner to intermediate
312 pages
7h 22m
English
Now we’re ready to complete the workflow by composing the implementations of the steps into a pipeline. We want the code to look something like this:
| | let placeOrder : PlaceOrderWorkflow = |
| | fun unvalidatedOrder -> |
| | unvalidatedOrder |
| | |> validateOrder |
| | |> priceOrder |
| | |> acknowledgeOrder |
| | |> createEvents |
But we have a problem, which is that validateOrder has two extra inputs in addition to UnvalidatedOrder. As it stands, there’s no easy way to connect the input of the PlaceOrder workflow to the validateOrder function, because the inputs and outputs don’t match.

priceOrder has two inputs, so it can’t ...
Read now
Unlock full access