{- boolean channels -} type Boolean = ^[^[] ^[]] {- true and false -} def True b : Boolean = b?[t f] = t![] and False b : Boolean = b?[t f] = f![] {- check value of boolean located at the specified channel -} def Check b : Boolean = (new t : ^[] new f : ^[] ( b![t f] | t?[] = print!"It's true" | f?[] = print!"It's false")) {- negation of the boolean located at the first specified channel, located at the newly created second specified channel -} def Not [b1 : Boolean b2 : Boolean] = b2?[t f] = b1![f t] {- Conjunction of the booleans located at the first and second specified channel, located at the newly created third specified channel -} def And [b1 : Boolean b2 : Boolean b : Boolean] = b?[t f] = (new x:^[] ( b1![x f] | x?[] = b2![t f])) {- test of And -} new b1 : Boolean {- false -} new b2 : Boolean {- true -} new b : Boolean {- conjuction of b1 and b2 -} run (False!b1 | True!b2 | And![b1 b2 b] | Check!b)