Appearance
Unions
Any list of types can be unioned to create a new type using the or utility.
emacs-lisp
(et-is? 4 (or Number String))
;; -> t
(et-is? "foo" (or Number String))
;; -> tA pipe can be used as shorthand syntax for a union type.
emacs-lisp
(et-is? 4 Number|String)
;; -> tThe Never type is shorthand for an empty union, and matches no values.
emacs-lisp
(equal (et (or)) (et Never))
;; -> tPlacing a question mark at the end of a type name is shorthand for unioning that type with Nil.
emacs-lisp
(equal (et Integer?) (et Nil|Integer))
;; -> t