purescript-contrib/purescript-book

Chapter 9, final exercise description improvement

a-tsvil opened this issue · 1 comments

First of all, thanks so much for this incredible project! I want to propose an improvement for task description

Where:

  • Chapter 9
  • Parallel Computations sub-chapter exercises
  • Exercise 3 - recurseFiles function

Problem:
Exercise description expected output should be aligned with one that is expected in the code test. I spend some additional time implementing that exact behavior just to find out that the test actually expected me to not use relative paths.

Hmm, it seems like it was aligned (or I'm misreading something). I'm going to go ahead and close it. If someone still has this issue, please reopen it.

Book text

The expected output is:
["root.txt","a.txt","b/a.txt","b/b.txt","b/c/a.txt","c/a/a.txt"]

Test code

-- Added a log in the recurseFiles test
log ("Expected: " <> show actualRelative)
Assert.equal (Set.fromFoldable expected) $ Set.fromFoldable actualRelative
→ Suite: recurseFiles
  Expected: ["root.txt","a.txt","b/b.txt","b/c/a.txt","b/a.txt","c/a/a.txt"]
✓ Passed: many files