E 4 6
E 4 6

Reputation: 157

Which data type in Racket is this?

For example:

'(ace spade king queen)

I understand it's in a list but i'm not sure what data type that would be.. I'm assuming it's a string but isn't a string supposed to have double quotations around the word?

Upvotes: 1

Views: 80

Answers (1)

Óscar López
Óscar López

Reputation: 236034

It's a list of symbols (not strings). It's the same as this:

(list 'ace 'spade 'king 'queen)

For more details please check the documentation. Notice that a list of strings would look like this:

'("ace" "spade" "king" "queen")

Or equivalently:

(list "ace" "spade" "king" "queen")

Upvotes: 5

Related Questions