On Jan 8, 2008 12:09 PM, minh thu <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Say I write in csi somethign like
> (for-each-line (lambda (line) (display line)))
> which will read from current-input-port,
Correct.
>
> how can I end the input (if I use ctrl-d, it stops csi too) ?
You will have to handle it yourself. One way would be to
check the input (say, an empty line) and abort the iteration:
(call/cc
(lambda (continue)
(for-each-line
(lambda (line)
(when (string=? "" line) (continue #f))
...))))
> How can I make csi display another prompt while reading ?
#;1> (repl-prompt (lambda () "::: "))
::: 123
123
::: 456
456
::: (+ 3 4)
7
cheers,
felix
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users