Skip to content

Conversation

dfuenzalida
Copy link
Contributor

@dfuenzalida dfuenzalida commented Jul 19, 2025

Two of the Struct examples at https://janet-lang.org/docs/syntax.html#Structs-1 won't work on the REPL:

$ janet
Janet 1.38.0-ddc12295 linux/x64/gcc - '(doc)' for help
repl:1:> {(1 2 3) (4 5 6)}
repl:1:2: compile error: 1 expects 1 argument, got 2
repl:2:> {'(1 2 3) '(4 5 6)}
{(1 2 3) (4 5 6)}

This PR changes 2 examples to the tuple literal (square brackets) that are introduced in the Tuples section right before Structs. For newcomers it's probably simpler to use the square brackets rather than using quote (') at this point in the docs (quote is introduced in the Special Forms section, right after Structs).

@sogaiu
Copy link
Collaborator

sogaiu commented Jul 19, 2025

LGTM

Copy link
Member

@pepe pepe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bakpakin bakpakin merged commit b28d1f7 into janet-lang:master Aug 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants