CDuce/Types/Boolean connectives

From Wikibooks, open books for an open world
< CDuce‎ | Types
Jump to: navigation, search

Conjunction[edit]

#print_type 1--7 | 5--10;;
-> 1--10
type IntOrChar = Int | Char;;

Disjunction[edit]

#print_type 1--7 & 5--10;;
-> 5--7

Difference[edit]

#print_type Int \ 0;;
-> *---1 | 1--*

Empty set[edit]

#print_type 1--3 & 5--6;;
Empty

Universal type[edit]

"Any" is the set of all the values. "_" is the same thing, but is preferred in patterns context.

#print_type _;;
-> Any