I want to negate the return value of a function in a cool way.
Given this function:
let yes = fun() -> true
I want to implement no as a negation of yes
let no = not yes //doesn't work
Does any kind of syntatic sugar exist in F# to make this possible?
P.S. I am not looking for this:
let no = fun() -> not yes() // boring
This will work:
let no = not << yes
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