-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
add Vec\get
, Vec\get_typed
, Dict\get
and Dict\get_typed
functions.
#374
Comments
@veewee what do you think about this? could be really useful for chaining :) Dict\get($arr, "foo")
->then(fn($value) => ...)
->then(fn($value) => ...)
->then(fn($value) => ...); |
would be lovely indeed! Where do you draw the line in consistency? In an ideal world, we wouldnt have to deal with nulls in PSL... |
hm, returning none for invalid type would be a weird, and might be confusing, i think we can start by adding |
The typed version could return |
I think there's a solution, we use naming to indicate what the return will be.
rule:
|
as for and it's a simple rule:
now as for
|
Yeah that sounds good. I don't hate
|
|
( there's also lock() vs tryLock(), it's more of a waiting convention, if |
API:
The text was updated successfully, but these errors were encountered: