Skip to content

Use square brackets in Tuples examples #301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025

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