From: Panicz Maciej Godek <godek.maciek@gmail.com>
To: Park SungMin <byulparan_eng@icloud.com>
Cc: "guile-user@gnu.org" <guile-user@gnu.org>
Subject: Re: How to define user reader macro in guile?
Date: Sun, 20 Mar 2016 12:40:55 +0100 [thread overview]
Message-ID: <CAMFYt2Z_PU1-xKAXu6VWE9LKrkk7VOxh=JX5-REYzg1ZKAzRDQ@mail.gmail.com> (raw)
In-Reply-To: <0E897CCB-9B3E-42EF-B4F3-7A7EBAB45F59@icloud.com>
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
2016-03-20 11:38 GMT+01:00 Park SungMin <byulparan_eng@icloud.com>:
>
> is it possible to expand via squared-bracket.
>
> i.e... [1 2 3] => (list 1 2 3) [(+ 1 2) 3] => (list (+ 1 2) 3)
>
>
> I know (read-enable 'square-brackets) ...but It just same paren.
>
> [1 2 3] => (1 2 3)
>
> is it possible?
>
The closest thing is read-hash-extend:
https://www.gnu.org/software/guile/manual/html_node/Reader-Extensions.html#Reader-Extensions
You can have a look in here to see a more sophisticated example:
https://bitbucket.org/panicz/slayer/src/8b741c21b7372c24874d7cd1875e2aae3fc43abe/guile-modules/extra/ref.scm?at=default&fileviewer=file-view-default#ref.scm-201
(however, I do not recommend to use such extensions)
[-- Attachment #2: Type: text/html, Size: 1475 bytes --]
prev parent reply other threads:[~2016-03-20 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-20 10:38 How to define user reader macro in guile? Park SungMin
2016-03-20 11:40 ` Panicz Maciej Godek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMFYt2Z_PU1-xKAXu6VWE9LKrkk7VOxh=JX5-REYzg1ZKAzRDQ@mail.gmail.com' \
--to=godek.maciek@gmail.com \
--cc=byulparan_eng@icloud.com \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).