All Projects → zyrolasting → Racket Koans

zyrolasting / Racket Koans

Licence: other
Learn Racket by doing: Practice language features by fixing topic-oriented unit tests.

Programming Languages

racket
414 projects

Learn the Racket language by fixing unit tests related to language features.

Use this project if you are just starting out and want isolated exercises to practice taking baby-steps before working on larger projects.

Test files are named after the topics they cover. When all tests run, the test topic files will execute in an order based loosely on The Racket Guide.

Usage

Install Racket and make sure all of its commands are available to your shell.

  • Run racket koans/<topic>.rkt to run tests for a topic.
  • Run racket koans/all.rkt to run all tests.

Read koans/all.rkt to see suggested reading order.

To practice, open a topic file and make all tests pass. Intentionally places ? characters will mark where you are expected to write an answer. Other times tests will be written with intentionally incorrect code.

Contributing

It's too early to formalize a procedure, but I am happy and grateful to look at any PRs you open. Since this codebase consists of intentionally failing unit tests, I cannot accept already “solved” exercises, although having some passing unit tests to set context for an exercise is okay.

If you are also learning Racket, you can contribute by checking out changes made in a PR and verifying that:

  1. The koans provided make sense for their topic.
  2. They can be fixed with reasonable effort.

For honor reasons, please do not spoil answers. If you must mention a possible solution, please keep it to pedagogical discussions.

I do ask that commit messages and PR titles make it clear what topics you are contributing toward to make history easier to scan.

Coding conventions

You may ignore rules only when necessary.

  • Wrap at 80 columns.
  • 2-space indent.
  • Comment patterns
    • Use a ;;; prefix for file overview comments.
    • Use a ;; prefix for comments that are not inline with code.
    • Use a ; prefix for comments that are inline with code.
    • Fill columns 1 to 80 ; with two leading blank lines and one trailing blank line to divide sections.

Current project goals

  • Better CLI usage for run all tests, or selected tests by topic. Support running tests automatically via file watching.
  • Gauge community interest and nurture growth if project is helpful.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].