> Ah, and I though that syntax-rules was always written in term of
> syntax-case. I see. Thank you!
Yeah, it most most often is these days, but historically, syntax-rules was
invented before syntax-case. IIRC, the choice to include syntax-case in R6RS
was controversial because syntax-rules
On Thu, 14 Mar 2024, Jean Abou Samra wrote:
>> Excuse my ignorance, by why is symbol?? not written using syntax-cases
>> and the `indentifier?' guard?
>
> a) Because it's intellectually interesting to see what the power of
> syntax-rules is :)
> b) Not all Scheme standards and implementations con
> Excuse my ignorance, by why is symbol?? not written using syntax-cases
> and the `indentifier?' guard?
a) Because it's intellectually interesting to see what the power of
syntax-rules is :)
b) Not all Scheme standards and implementations contain syntax-case.
Excuse my ignorance, by why is symbol?? not written using syntax-cases
and the `indentifier?' guard?
On Thu, 14 Mar 2024, Zelphir Kaltstahl wrote:
> Hello Guile Users!
>
> I am having trouble understanding how the `symbol??` macro from
> https://okmij.org/ftp/Scheme/assert-syntax-rule.txt work
On 3/14/24 02:01, Jean Abou Samra wrote:
Hi!
The explanations are on
https://okmij.org/ftp/Scheme/macros.html#macro-symbol-p
Maybe this version will be easier to understand (we don't really
need continuation-passing style here):
(define-syntax symbol??
(syntax-rules ()
((symbol?? mayb
(define-syntax symbol??
(syntax-rules ()
;; The check is done by first pattern matching against some other
;; forms, that are not a symbol.
((symbol?? (x . y) kt kf) kf) ; It's a pair, not a symbol
((symbol?? #(x ...) kt kf) kf) ; It's a vector, not a symbol
The first two ca
Hi!
The explanations are on
https://okmij.org/ftp/Scheme/macros.html#macro-symbol-p
Maybe this version will be easier to understand (we don't really
need continuation-passing style here):
(define-syntax symbol??
(syntax-rules ()
((symbol?? maybe-symbol)
(let-syntax
((test
Hello Guile Users!
I am having trouble understanding how the `symbol??` macro from
https://okmij.org/ftp/Scheme/assert-syntax-rule.txt works.
Here is what I have so far:
start
;; (symbol?? FORM KT KF)
;; FORM is an arbitrary form or datum.
;; A symbol? predicate at the macro-expand ti