Comments (3)
@milesfrain Anyone pick up this one to implement? If not, I'll do it.
from purescript-book.
That would be great. Thanks for checking.
Not all the exercises are testable though, so here's a list of ones that I'd suggest focusing on writing:
- Group 1
-
third
function. I think it might be good to change the exercise text to open with the task:Write a function
third
which returns the third element of an array with three or more elements. Your function should return an appropriate Maybe type.Then add on additional problem-solving advice:
You should use do notation with the
Maybe
monad to combine thehead
andtail
functions from theData.Array
module in thearrays
package. -
sums
function. Perhaps rename topossibleSums
-
filterM
function
-
- Group 2
safeDivide
. In the test code, wrap this in atry
block. The exercise should probably state the specific error string to throw.
Also, feel free to propose new exercises, change around the exercise wording, or even break the exercises into multiple pieces if that fits better with testing. I'm doing that now with chapter 7, now that I'm taking a deeper read through it. I'll link to that here once it's merged to give a better idea of the depth of exercise changes that I feel are appropriate.
from purescript-book.
Thanks for the advice for what to test; really saves me a lot of time. I'll think about changing exercises that are not easy to test, or at least provide related exercises that have unit tests.
from purescript-book.
Related Issues (20)
- chapter8 chapter10 parcel package.json, index.html error
- spago build fails for chapter8-chapter11 HOT 2
- "Getting Started" directions don't work on OSX HOT 7
- [Ch3] Indentation docs for `where` are wrong HOT 1
- :memo: Chapter 8 standard form label use HOT 1
- Chapter 11 HOT 1
- chapter 10 duplicated mapSetFoo instead of alternative
- chapter 10 double negation intended or typo? HOT 2
- Chapter 9, final exercise description improvement HOT 1
- Error in Handbook - Asynchronous Effects
- Update Book to PureScript `0.15.0` HOT 2
- Chapter 10: Confusion between `id` and `identity` functions HOT 4
- Getting Started scripts - not all lines are removed
- error ERR_REQUIRE_ESM following instructions in Getting Started HOT 1
- Example from book fails on freebsd HOT 3
- [CH4] A more concise implementation of fibTailRec. HOT 1
- Warning about not using latest spago.
- Swap of Ch4 and Ch5 incomplete HOT 1
- Ch6: Subclass/Superclass confusion for `Ord`/`Eq`
- Not clear that Exercise should include subdirectories
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-book.