Giter VIP home page Giter VIP logo

Comments (3)

oldfartdeveloper avatar oldfartdeveloper commented on July 25, 2024

@milesfrain Anyone pick up this one to implement? If not, I'll do it.

from purescript-book.

milesfrain avatar milesfrain commented on July 25, 2024

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 the head and tail functions from the Data.Array module in the arrays package.

    • sums function. Perhaps rename to possibleSums

    • filterM function

  • Group 2
    • safeDivide. In the test code, wrap this in a try 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.

oldfartdeveloper avatar oldfartdeveloper commented on July 25, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.