-
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
Add Maybe.Extra.justIf #56
Labels
new function
Request to add a new function to the library
Comments
See also: #55 (comment) |
I think |
I think the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe.Extra.justIf : Bool -> a -> Maybe a
Motivating use case
I had a dropdown menu with a few actions for the user to choose. I needed to remove one of the actions from the list based on a boolean.
Normally I'd do it with:
Our code is full of this pattern.
Maybe there's also some
Html.Attributes.classList
-like way? I'm thinkingList.Extra.filter : List (a, Bool) -> List a
.The text was updated successfully, but these errors were encountered: