CDuce/Types/Boolean connectives

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

Contents

[edit] Conjunction

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

[edit] Disjunction

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

[edit] Difference

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

[edit] Empty set

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

[edit] Universal type

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

#print_type _;;
-> Any
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox
Sister projects
Print/export