/usr/lib/s9fes/help/quasiquote is in scheme9 2010.11.13-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | R4RS 4.2.6 (quasiquote <template>) ==> object
(unquote <expression>) ==> object
(unquote-splicing <expression>) ==> list
(quasiquote <template>) ==> datum
`<template> ==> datum
(unquote expression) ==> obj
,expression ==> obj
(unquote-splicing expression) ==> list
,@expression ==> list
"Backquote" or "quasiquote" expressions are useful for constructing
a list or vector structure when most but not all of the desired
structure is known in advance. If no commas appear within the
<template>, the result of evaluating `<template> is equivalent to
the result of evaluating '<template>. If a comma appears within the
<template>, however, the expression following the comma is evaluated
("unquoted") and its result is inserted into the structure instead
of the comma and the expression. If a comma appears followed
immediately by an at-sign (@), then the following expression must
evaluate to a list; the opening and closing parentheses of the list
are then "stripped away" and the elements of the list are inserted
in place of the comma at-sign expression sequence.
`(list ,(+ 1 2) 4) ==> (list 3 4)
(let ((name 'a)) `(list ,name ',name))
==> (list a (quote a))
`(a ,(+ 1 2) ,@(map abs '(4 -5 6)) b)
==> (a 3 4 5 6 b)
`((foo ,(- 10 3)) ,@(cdr '(c)) . ,(car '(cons)))
==> ((foo 7) . cons)
`#(10 5 ,(+ 1 1) ,@(map - '(4 9)) 8)
==> #(10 5 2 -4 -9 8)
The notations `<template> and (quasiquote <template>) are identical
in all respects. `,<expression>' is identical to `(unquote
<expression>)', and `,@<expression>' is identical to `(unquote-splicing
<expression>)'. The external syntax generated by write for two-element
lists whose car is one of these symbols may vary between implementations.
(quasiquote (list (unquote (+ 1 2)) 4))
==> (list 3 4)
'(quasiquote (list (unquote (+ 1 2)) 4))
==> `(list ,(+ 1 2) 4)
i.e., (quasiquote (list (unquote (+ 1 2)) 4))
Unpredictable behavior can result if any of the symbols QUASIQUOTE,
UNQUOTE, or UNQUOTE-SPLICING appear in positions within a <template>
otherwise than as described above.
NOTE: S9fES supports only that subset of quasiquote templates that
can be resolved completely at expansion time, without leaving any
instances of QUASIQUOTE, UNQUOTE, or UNQUOTE-SPLICING in the resulting
form. E.g.
`(+ 1 ,(* 2 `,(+ 3 4)))
works, but
`(+ 1 `,(* 2 ,(+ 3 4)))
does not, because it attempts to quasiquote QUASIQUOTE.
|