Skip to content

Add the Elyses Enchantments concept exercise for arrays - #992

Merged
glennj merged 6 commits into
exercism:mainfrom
glennj:concept-exercise-arrays
Dec 5, 2026
Merged

glennj merged 6 commits into
exercism:mainfrom
glennj:concept-exercise-arrays

Conversation

@glennj

@glennj glennj commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

glennj and others added 3 commits December 4, 2026 13:21
Move the associative-arrays section out of the arrays concept into a new
associative-arrays concept, a sibling of more-arrays in the syllabus.

Also add to arrays: checking for an element with -v, removing one with
unset, and a few wording fixes.
Add the suggested exercises to the concept exercise road-map, and make
looping the prerequisite for arrays.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Fork the JavaScript elyses-enchantments story for the arrays concept,
with looping as its prerequisite.

The exercise uses a subcommand interface: the first argument names the
operation, and the remaining arguments are that operation's inputs.
The stub provides the `case` dispatch and the argument handling, so the
student only writes the array logic in each branch.

There are eight tasks, each printing a single line: retrieving a card by
index, exchanging a card, inserting and removing at the top and at the
bottom of the stack, and checking the size of the stack.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@glennj
glennj requested a review from a team December 4, 2026 18:31
@glennj glennj added x:action/create Work on something from scratch x:module/practice-exercise Work on Practice Exercises x:type/content Work on content (e.g. exercises, concepts) x:rep/large Large amount of reputation labels Dec 4, 2026
@glennj
glennj marked this pull request as draft December 4, 2026 18:33
glennj and others added 2 commits December 5, 2026 07:44
- Describe the top of the stack consistently as the end of the array
- Make the two empty-output tests fail against the unsolved stub
- State what to print for a position with no card
- Give away less of the solution in the hints
- Fix a heading level and typos in the arrays concept docs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@glennj
glennj marked this pull request as ready for review December 5, 2026 13:17
Name the case branch variables for what they hold instead of
"parameter", and drop the empty-stack note from the instructions
since the hints already cover it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@glennj

glennj commented Dec 5, 2026

Copy link
Copy Markdown
Contributor Author

I've renamed "parameter" everywhere. It now has an appropriate name given its context.

And that empty stack note is really already covered in the hints, so it's simply removed.

@glennj glennj added the ready-to-translate The English in this PR is final; queue its translations label Dec 5, 2026
exercism-i18n Bot added a commit to exercism/i18n that referenced this pull request Dec 5, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@exercism-i18n

exercism-i18n Bot commented Dec 5, 2026

Copy link
Copy Markdown

This PR has been translated 🚀

@glennj
glennj merged commit 5f21e9f into exercism:main Dec 5, 2026
12 of 13 checks passed
@glennj
glennj deleted the concept-exercise-arrays branch December 5, 2026 21:26
@glennj glennj added x:module/concept-exercise Work on Concept Exercises and removed x:module/practice-exercise Work on Practice Exercises labels Dec 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-translate The English in this PR is final; queue its translations x:action/create Work on something from scratch x:module/concept-exercise Work on Concept Exercises x:rep/large Large amount of reputation x:type/content Work on content (e.g. exercises, concepts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants