Hi David,

On Jan 11 2019, David Ireland wrote:

Hi there,

I'm reading from a (string) port and have a need to peek 2 characters
inside without actually reading off the port (read-char).

I believe procedures such as unread-char seen in other Schemes would solve
my problem however, this isn't available in Chicken it seems.

I do not recall that I ever used unread-char ever. I roughly recall that it usually can only "un-read" a single character. But that might be wrong.

Would anyone have any suggestions?

If you really need such a thing, my only suggestion would be to look into
http://wiki.call-cc.org/man/5/Module%20(chicken%20port)

make-input-port combined with make-concatenated-port and some tricks could do the trick.

Best

/Jörg


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to