We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
matches([1])( (a, b, tail) => 'Will not match here', (a = 2, tail = []) => 'Will not match here', (a = 1, tail) => 'Will match here, tail = []' )
I would have expected the 3rd case to match.
Did the library change and the docs haven't been updated?
The text was updated successfully, but these errors were encountered:
@ashleydavis only if you pass 1 as argument it would match the last case. [1] is an array of 1 .
1
[1]
Please let me know if that answered your question.
Sorry, something went wrong.
The example above (from your README) implies that the last case will be matched and the value returned will be 'Will match here, tail = []'.
'Will match here, tail = []'
This doesn't happen.
Instead, it returns undefined.
undefined
So either your example is wrong or a bug has been introduced in the library which breaks this example.
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: