Skip to content

add thunks concept and exercise#447

Merged
oxe-i merged 2 commits into
exercism:mainfrom
oxe-i:addThunksConcept
May 24, 2026
Merged

add thunks concept and exercise#447
oxe-i merged 2 commits into
exercism:mainfrom
oxe-i:addThunksConcept

Conversation

@oxe-i

@oxe-i oxe-i commented May 24, 2026

Copy link
Copy Markdown
Contributor

This adds a thunks concept and its exercise. This concept has recursion as a prerequisite (which in turn has stack as a prerequisite) and is meant as an introduction to functional patterns in assembly.

The exercise has a test file in C, as usual, but also a second .asm file with a global function, clobber, called from the test file. clobber takes a value and forwards it while also inserting -1 into all caller-saved registers (except rax). This is to force students to pay close attention to the correct use of caller and callee-saved registers when calling external functions.

I tried to make a shorter concept, with a more focused exercise, so I left the specifics of functional patterns for a possible future concept.

I used Claude (a LLM) to revise the text for the concept and for the exercise, and to generate test cases. It also suggested the theme for the exercise (bookkeeping), which seemed a good fit.

@oxe-i oxe-i merged commit b05d08b into exercism:main May 24, 2026
5 checks passed
@oxe-i oxe-i deleted the addThunksConcept branch May 24, 2026 10:14
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.

2 participants