I have some code which collects points (consed integers) from a loop which looks something like this:
(loop for x from 1 to 100 for y from 100 downto 1 collect `(,x . ,y))
My question is, is it correct to use `(,x . ,y) in this situation?
Edit: This sample is not about generating a table of 100×100 items, the code here just illustrate the use of two loop variables and the consing of their values. I have edited the loop to make this clear. The actual loop I use depends on several other functions (and is part of one itself) so it made more sense to replace the calls with literal integers and to pull the loop out of the function.
It would be much ‘better’ to just do (cons x y).
But to answer the question, there is nothing wrong with doing that 🙂 (except making it a tad slower).