[48in24 Exercise] [06-11] Yacht

This issue is a discussion for contributors to collaborate in getting ready to be featured in 48in24. Please refer to this forum topic for more info.


We will be featuring Yacht from Jun 11 onwards.

Staff jobs

These are things for Erik/Jeremy to do:

  • ☐ Check/update exercise in Problem Specifications
  • ☐ Create + schedule video

Community jobs

For each track:

  • Implement Yacht
  • Add approaches (and an approaches introduction!) for each idiomatic or interesting/educational approach.
  • Add video walkthroughs (record yourself solving and digging deeper into the exercise).
  • Highlight up to 16 different featured exercises (coming soon)

Existing Approaches

You can use these as the basis for approaches on your own tracks. Feel free to copy/paste/reuse/rewrite/etc as you see fit! Maybe ask ChatGPT to translate to your programming language.

Track Statuses

You can see an overview of which tracks have implemented the exercise at the #48in24 implementation status page.

I’ve currently gathered the following solutions to feature:

  1. Go: counting occurrences and for loops
    First count the occurrences of each die and then use for loops

  2. Nim: table with dice counts
    Use the CountTable data structure

  3. Scala: (higher-order) functions
    Solely rely on (higher-order) functions

  4. Elixir: pattern matching
    Sort first then use pattern matching

  5. Prolog: predicates and unification
    Use predicates and unification

  6. F#: pattern matching using custom patterns
    Extract the logic to match dice with a category to Active Patterns

  7. SQLite: temporary tables and relational querying
    Create temporary tables for the dice counts and query them

If anyone has more suggestions, do let us know!

I’ll work on porting the exercise for CoffeeScript and Vimscript

3 Likes

I implemented it in Common Lisp.

3 Likes

Multi dispatch in Raku using subroutine signatures to determine the correct result: m-dango's solution for Yacht in Raku on Exercism

1 Like

Just a little too late @m-dango, sorry. We have already recorded.

Ported for V

I’ll add for Groovy, LFE, Red, Pyret, and Wren next.

2 Likes