lexi-lambda / functional

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

Use functor map implementation for sequences when applicable #12

Open countvajhula opened 4 years ago

countvajhula commented 4 years ago

Fixes #11.

At the moment, it looks like map delegates sequence input to the data/collection version of map in order to leverage the "zip" behavior when more than one sequence input is provided, in which case the functor implementation would be inapplicable in any case. This fix modifies that condition to specifically check for the presence of more than one input sequence before delegating. Otherwise, it uses the functor implementation, including for the case of a lone sequence.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-1.1%) to 89.286% when pulling a3a35ab083a269c2feea6f3da18885e3ccae29c6 on countvajhula:functor-sequence-priority into d42bad2669ff5aaa07879a9797fcc42ce7dd9df4 on lexi-lambda:master.