val: Eany evlst: [E0 E1 …]Occasionally, the need arises to evaluate something explicitly. The val primitive does this for you. When used as shown above, a double evaluation actually occurs; the expression Eany is evaluated once by the application and the result is evaluated again explicitly by val.
evlst maps evaluation over a list or stream.
isDCT?:V => true if V is a directive, nil otherwise isFTN?:V => true if V is a function cell, nil otherwise isNML?:V => true if V is a number cell, nil otherwise isIDE?:V => true if V is an identifier cell, nil otherwise isLST?:V => true if V is a list cell, nil otherwise isAPL?:V => true if V is an application cell, nil otherwise isMSG?:V => true if V is a message cell, nil otherwisePlease note that these tags are overloaded; two or more primitive data types may be represented using the same tag. For example, a variety of different number types are stored under the NML tag. We do not describe the underlying tag values or data representations in this manual. Furthermore, these tag assignments and representations may change in future versions of Daisy-e.g. a "function" may not be represented using a function tag.
The isMSG? primitive can only be used to detect that something is not an erron. If the argument is an erron, isMSG? returns a new erron. For reliably detecting errons, use the isERR? primitive.
asDCT:V => returns a directive reference or erron asFTN:V => returns a function reference or erron asNML:V => returns a number reference or erron asIDE:V => returns a identifier reference or erron asLST:V => returns a list reference or erron asAPL:V => returns a application reference or erron asMSG:V => returns a message reference or erron
cmp?:[V0 V1] => true if V0 and V1 resolve to the same reference, nil otherwiseThis predicate tells you whether two references are the same (have the same tag and point to the same object). It is very efficient, but should be used carefully. For example,
cmp?:[5 5]Could return true or nil, depending on whether the interpreter (or compiler) creates two number cells or shares one for the list of fives. For general testing of equality of symbols and numbers, use same? .
%gc:N => Nfree%gc invokes a garbage collection. The number returned is the amount of free space recovered in cells.
%time:N => [Nsec Nusec]%time takes an integer and returns two integers representing seconds and milliseconds. The exact nature of the values depends on N: