* How to define user reader macro in guile? @ 2016-03-20 10:38 Park SungMin 2016-03-20 11:40 ` Panicz Maciej Godek 0 siblings, 1 reply; 2+ messages in thread From: Park SungMin @ 2016-03-20 10:38 UTC (permalink / raw) To: guile-user 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? ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How to define user reader macro in guile? 2016-03-20 10:38 How to define user reader macro in guile? Park SungMin @ 2016-03-20 11:40 ` Panicz Maciej Godek 0 siblings, 0 replies; 2+ messages in thread From: Panicz Maciej Godek @ 2016-03-20 11:40 UTC (permalink / raw) To: Park SungMin; +Cc: guile-user@gnu.org [-- 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 --] ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-03-20 11:40 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-03-20 10:38 How to define user reader macro in guile? Park SungMin 2016-03-20 11:40 ` Panicz Maciej Godek
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).