> It may be overkill for this use case, but I would probably use the
> parsack package, since I think its interface is pretty intuitive.

:) I had started writing up a parsack example, and I was all set to
admonish the OP for not creating a parser when you want a parser but
then I saw it was for a programming contest where I guess this sort of
scanf/regexp hackery is ok?

> Should it throw an exception, or should it
> return #f? I’m not sure there is great precedent set here, though
> throwing seems to be the Racket way in other places.

printf throws an exception when there's a type mismatch, eg (printf "~b" "1")

(thanks for the example Ben)


>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to