Let say i have a predicate is_foo?/1
in Elixir
I want to use it in a function taking a predicate as an argument, but negated.
Is there a way in Elixir to do that simply ?
&(!is_foo? &1)
should do it.
Or if you prefer the long form, fn x -> !is_foo? x end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With