annotate type obj
Tags the object with the given type.
|
>(type (annotate 'mac car)) mac |
rep obj
Returns the underlying object for an annotated object
|
>(rep whilet) #<procedure> |
sym x
Coerces x to a 'sym.
|
>(sym "a") a |
coerce obj type [args]
Coerces object to a new type. A char can be
coerced to int, string, or sym. A number can be coerced to int, char, or string
(of specified base). A string can be coerced to sym, cons (char list), or int (of
specified base). A list of characters can be coerced to a string. A symbol
can be coerced to a string.
|
>(coerce "a" 'sym) a >(coerce 65 'char) #\A >(coerce 65 'int 2) 65 >(coerce "abc" 'cons) (#\a #\b #\c) |
type object
Returns the type of an object (as a symbol).
Possibilities are cons, sym, fn, char, string, int, num, table, output,
input, socket, exception, or mac.
|
>(type 1) int >(type car) fn |
Copyright 2008 Ken Shirriff.