lexi-lambda / functional

Functional interfaces and datatypes for Racket
ISC License
42 stars 9 forks source link

Applicative-apply should return an applicative #9

Closed AlexKnauth closed 4 years ago

AlexKnauth commented 5 years ago

In particular, the examples for the id applicative and monad should return id instances from apply.

(define (apply f xs)
  (id (base:apply (id-val f) (base:map id-val xs))))
coveralls commented 5 years ago

Coverage Status

Coverage decreased (-9.6%) to 90.397% when pulling b430ee5fc3c294541c021ce8f8ae99f2aca988ac on AlexKnauth:patch-1 into 9a3ec7681a0ecf4ba842e389c7a70acde826fcfb on lexi-lambda:master.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-9.6%) to 90.397% when pulling b430ee5fc3c294541c021ce8f8ae99f2aca988ac on AlexKnauth:patch-1 into 9a3ec7681a0ecf4ba842e389c7a70acde826fcfb on lexi-lambda:master.

AlexKnauth commented 5 years ago

This changes the documentation, but it does not change what a "proper" implementation of the applicative interface is. The test in tests/data/applicative.rkt stays the same; this PR only changes the documentation to follow that.

I don't know why coverage went down so much when I didn't change any tests or add any new lines of code.

lexi-lambda commented 4 years ago

Thanks for this! Sorry for the delay.