March 2019
Intermediate to advanced
208 pages
5h 11m
English
Add record types and bindings to the code that analyzes shirt orders as described , to allow it to use Papa Parse. Start with file code/interop/stats/src/Stats.re, which contains comments that tell you what you need to add. Look for sections marked TODO: for instructions. The Error module, which we’ve already developed, is in the file as a guide for the other records you need to create. I’ve taken the shirt-oriented types and separated them into file code/interop/stats/src/Shirt.re to reduce the size of the Stats.re file.
You’ll need to do npm install --save papaparse in the stats directory to run the code:
| | # presume you are in the stats directory |
| | bsb -make-world |
| | node src/Stats.bs.js orders.csv |
You may see the solution ...
Read now
Unlock full access