Open ashleydavis opened 3 years ago
@ashleydavis only if you pass 1
as argument it would match the last case. [1]
is an array of 1
.
Please let me know if that answered your question.
The example above (from your README) implies that the last case will be matched and the value returned will be 'Will match here, tail = []'
.
This doesn't happen.
Instead, it returns undefined
.
So either your example is wrong or a bug has been introduced in the library which breaks this example.
Thanks for this library, it's really nice.
If found an issue with an example on the web page.
If you run this code, nothing matches, it returns undefined:
I would have expected the 3rd case to match.
Did the library change and the docs haven't been updated?