any.spad line 40 [edit on github]
Any implements a type that packages up objects and their types in objects of Any. Roughly speaking that means that if s : S
then when converted to Any, the new object will include both the original object and its type. This is a way of converting arbitrary objects into a single type without losing any of the original information. Any object can be converted to one of Any.
any(type, object)
is a technical function for creating an object of Any. Argument type
is a LISP form for the type
of object
.
dom(a)
returns a LISP form of the type of the original object that was converted to Any.
domainOf(a)
returns a printable form of the type of the original object that was converted to Any.
obj(a)
essentially returns the original object that was converted to Any except that the type is forced to be None.
objectOf(a)
returns a printable form of the original object that was converted to Any.
showTypeInOutput(bool)
affects the way objects of Any are displayed. If bool
is true
then the type of the original object that was converted to Any will be printed. If bool
is false
, it will not be printed.