F# program to perform the boolean operations
Program.fs
let a : bool = true
let b : bool = false

printfn "———————————————————————————————————————————"
printfn "Program to perform boolean operations"
printfn "———————————————————————————————————————————"
printfn "Value of a      | %b " a
printfn "Value of b      | %b " b
printfn "Value of not a  | %b " (not a)
printfn "Value of not b  | %b " (not b)
printfn "Value of a && b | %b " (a && b)
printfn "Value of a || b | %b " (a || b)
printfn "———————————————————————————————————————————"
Output
kodingwindow@kw:~/fsharp$ dotnet run
———————————————————————————————————————————
Program to perform boolean operations
———————————————————————————————————————————
Value of a      | true 
Value of b      | false 
Value of not a  | false 
Value of not b  | true 
Value of a && b | false 
Value of a || b | true 
———————————————————————————————————————————
kodingwindow@kw:~$ 
Advertisement