F # function negation chain

I want to negatively return the return value of a function.

Given this function:

let yes = fun() -> true 

I want to implement no as negation yes

 let no = not yes //doesn't work 

Is there any syntactic sugar in F # to make this possible?

PS I'm not looking for this:

 let no = fun() -> not yes() // boring 
+6
source share
1 answer

This will work:

 let no = not << yes 
+10
source

Source: https://habr.com/ru/post/912255/


All Articles