[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read-hash-extend and geiser
From: |
Panicz Maciej Godek |
Subject: |
Re: read-hash-extend and geiser |
Date: |
Wed, 12 Sep 2012 03:57:17 +0200 |
OK, I think I've found the reason:
the ']' was not removed from the port,
so it caused a read error
> (read-hash-extend #\[
> (let ((process (match-lambda
> ((object key)
> `(ref ,object ,key))
> (default
> default))))
> (lambda (char port)
> (let loop ((exp '()))
> (let ((char (peek-char port)))
> (cond ((char-whitespace? char)
> (read-char port)
> (loop exp))
> ((eq? char #\])
(read-char port)
> (process (reverse exp)))
> (#t
> (loop (cons (read port) exp)))))))))
The question regarding the infix module still remains, though ;]