Copyright (C) 2000-2012 |
GNU Info (librep.info)DatumsDatums ====== "Datums" are the mechanism by which `librep' allows Lisp programs to define new data types, such that these types are completely distinct from the built-in data types (i.e. they match none of the standard type predicates). They also provide encapsulation, in that the data objects they provide are completely opaque, unless a pre-defined value is known (which was specified when the object was created, and is typically known only by the object's creator). - Function: make-datum value key Create and return a new datum object. It has the value VALUE associated with it, and has type KEY. - Function: datum-ref arg key If ARG has type KEY, then return the value associated with it. Otherwise, an error is signalled. - Function: datum-set arg key value If ARG has type KEY, then set the value associated with it to be VALUE. Otherwise, an error is signalled. - Function: has-type-p arg key Return true if ARG has type KEY. - Function: define-datum-printer key printer Associate the function PRINTER with all datum objects of type KEY. When any such object is printed, PRINTER is applied to two arguments, the datum and the stream to which it should be printed (Note: Output Streams). automatically generated by info2www version 1.2.2.9 |