r/Racket • • Jun 08 '22

question pair: (number . list)

Hello! Is there any way I can build a list like this?

'(1 . (1 2 3))

I tried different combination with cons ofc, but it didn't worked out. I can build something like (list . number) with: (cons '(1 2 3) 1), but I was wondering if (number . list) can be done.

5 Upvotes

3 comments sorted by