6.3 Conversion to Literal
procedure
(boolean->literal val) → literal?
val : boolean?
Returns a new typed literal with the datatype xsd:boolean.
procedure
(bytes->literal val) → literal?
val : bytes?
Returns a new typed literal with the datatype xsd:hexBinary.
procedure
(date->literal val) → literal?
val : date?
Returns a new typed literal with the datatype xsd:date.
procedure
(datetime->literal val) → literal?
val : date?
Returns a new typed literal with the datatype xsd:dateTime.
procedure
(exact-integer->literal val) → literal?
val : exact-integer?
Returns a new typed literal with the datatype xsd:integer.
procedure
(flonum->literal val) → literal?
val : flonum?
Returns a new typed literal with the datatype xsd:float or xsd:double.
procedure
(inexact->literal val) → literal?
val : inexact?
Returns a new typed literal with the datatype xsd:decimal.
procedure
(string->literal val) → literal?
val : string?
Returns a new typed literal with the datatype xsd:string.
procedure
(time->literal val) → literal?
val : date?
Returns a new typed literal with the datatype xsd:time.
procedure
val : (or/c boolean? bytes? date? string? exact-integer? flonum? inexact?)
Attempts to create a literal from "val" if it matches one of the type predicates listed.