January 2018
Beginner to intermediate
312 pages
7h 22m
English
In a previous discussion, we talked about documenting effects in the type signature: What effects could this function have? Could it return an error? Does it do I/O?
Let’s quickly revisit all our dependencies and double-check if we need to be explicit about any effects like this.
The validation step has two dependencies: CheckProductCodeExists and CheckAddress Exists.
Let’s start with CheckProductCodeExists:
| | type CheckProductCodeExists = ProductCode -> bool |
Could it return an error, and is it a remote call?
Let’s assume it’s neither of these. Instead, we will expect that a local cached copy of the product catalog is available (remember what Ollie said about autonomy in Chapter 2, Understanding ...
Read now
Unlock full access