literalize ( obj -- wrapped )
Factor documentation > Factor handbook > The language > Collections > Quotations > Wrappers
Prev:wrapper


Vocabulary
quotations

Inputs and outputs
objan object
wrappedan object


Word description
Outputs an object which evaluates to obj when placed in a quotation. If obj is not self-evaluating (for example, it is a word), then it will be wrapped.

Examples
USING: prettyprint quotations ; 5 literalize .
5

USING: math prettyprint quotations sequences ; [ + ] [ literalize ] map .
[ \ + ]


See also
curry, <wrapper>, \, W{

Definition
IN: quotations

GENERIC: literalize ( obj -- wrapped )


Methods
USING: locals.types quotations ;

M: local-reader literalize ;


USING: locals.types quotations ;

M: local literalize ;


USING: kernel quotations ;

M: object literalize ;


USING: kernel quotations words ;

M: word literalize <wrapper> ;


USING: kernel quotations ;

M: wrapper literalize <wrapper> ;