-values (a b c) (values 1 2 3))
>(set!-values* (_ _ c) (values 4 5 6))
>(list a b c)
>
>Jos
>
>
>
>
>From: users [mailto:users-boun...@racket-lang.org] On Behalf Of
>Roman Klochkov
>Sent: sábado, 28 de junio de 2014 8:43
>To: Rack
s [mailto:users-boun...@racket-lang.org] On Behalf Of
Roman Klochkov
Sent: sábado, 28 de junio de 2014 8:43
To: Racket Users List
Subject: [racket] Please help with syntax
I need to define syntax set!-values*, that will ignore _ in value
p
On June 28, 2014, at 12:43AM, Roman Klochkov wrote:
Racket Users list:
http://lists.racket-lang.org/users
On June 28, 2014, at 12:43AM, Roman Klochkov wrote:
Racket Users list:
http://lists.racket-lang.org/users
I need to define syntax set!-values*, that will ignore _ in value place.
Such as
(define a #f)
(set!-values* (_ _ a) (values 1 2 3)) ; should set a to 3.
But I have two problems:
1. _ don't want to pattern match in syntax case. If I make it literal, I can't
match "anything else".
2. How to omit
5 matches
Mail list logo