How to remove multiple options at once #8
Answered
by
rubenvanassche
AleJavierHY
asked this question in
Q&A
-
Hello, excellent package. I am trying to create a list of dynamic options from an enum class. |
Beta Was this translation helpful? Give feedback.
Answered by
rubenvanassche
Dec 7, 2022
Replies: 1 comment
-
Since reject takes a closure you can just do this: Options::forEnum(Hobbit::class)->reject(fn(Hobbit $hobbit) => in_array($hobbit, [Hobbit::Frodo, Hobbit::Sam]); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
AleJavierHY
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since reject takes a closure you can just do this: