The function line in darts.scm is somewhat misleading

The darts.scm given to students in the Darts exercise contains:

(import (rnrs))

(define (score arg)
  'implement-me!)

despite that the tests of this exercise call the score function with two arguments. If you look at test.scm, you will find lines like:

    (test-success "1. Missed target"
        = score '(-9 9) 0)

It is not unreasonable that a student thinks that the test runs (score '(-9 9)) for this particular test. Of course, you can find that the test actually runs (apply #'score '(-9 9)), if you go through test-util.ss. But the test-util.ss contains advanced stuffs. My guess is that not many students solving this exercise can handle it. Shouldn’t darts.scm be replaced with something like:

(import (rnrs))

(define (score x y)
  'implement-me!)
2 Likes

All true, unfortunately. PR will be submitted soon.

#402

1 Like

@colinleach, you are super responsive!! It is great that you have already fixed it.

3 Likes

Better not to have broken it initially, in an ideal world.

1 Like