On May 9, 2016, at 10:41 AM, Kevin Forchione <lyss...@gmail.com> wrote:
> 
> That was a surprise. So ids can’t have numerics as part of their arguments in 
> format-id? Is that correct? How would I make this work if I wanted to pass 
> numbers into the format-id to generate ids like foo7, bar3, etc?

The answer is in your error message. `format-id` only works with:

> (or/c string? symbol? identifier? keyword? char? number?)

In your example, you're passing #'7 as an argument, which is none of those 
things (it's not a number, because it's syntax; it's not an identifier, because 
7 is not a symbol)

As Ben mentioned, unwrapping the syntax with `syntax-e` will cure the problem, 
because then it will be a number.

Or `format-id` could be patched to automatically unwrap any syntax object that 
contains a single datum, obviating the need for `syntax-e` (which would seem 
consistent with its handling of things like #'foo)

-- 
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