-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
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
Support callables #10
Conversation
Performing the check in the same method is good enough for me! Thanks, I don't really do PHP anymore so I had to read up on the difference between type hinting Closures and callables haha. Add the test and I'll merge, thanks. Are you able to do it for Option as well to match? |
Yes wanted to finalise one of the two first then can do Option too. Also I was thinking to add more from Haskell Maybe and Either in here. Rust has got you? I was reading the book and ended up in this package the other day. |
@prewk tests added here, will do Option next. Althought the tests do feel a bit redundant now to be honest. Also, package versions should be ok right? Also since one depends on the other (both ways), could they not be one single package? |
Thanks a lot! Yes I think so, I'll bump minorly.
Hehe cool, I think there's a myriad of packages nowadays that do this pretty well. But may be wrong. But it's always fun to do your own take on it.
I really like it, but for work I'm deep in Typescript at the moment and will be for quite some time! |
@prewk Thanks for merging here too. |
Fixes #2
Is this what you had in mind?
Also, I am not sure if more should be added to the tests. If yes, any of the below two is preferable?
Separate methods like so
Or performing the check in the same method like so
I am not sure if it is something to test in the first place. It feels like it is.
@prewk