Closed
Description
Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Goal
The goal of this exercise is to teach the student how the with
special form works and when it is appropriate to use (e.g. to avoid nested case
s)
Learning objectives
- Know how to use
with
to chain matching clauses - Know how to use the
else
block inwith
to match on different kinds of errors - Know when not to use
with
Out of scope
?
Concepts
with
Prerequisites
errors
(thewith
special form is most commonly used with error/ok-tuples and the exercise should teach that)pattern-matching
- other, depending on the story
Exercises
Maybe sgf-parsing
could have with
in its requirements?
Resources to refer to
- https://hexdocs.pm/elixir/Kernel.SpecialForms.html#with/1
- https://elixir-lang.org/getting-started/mix-otp/docs-tests-and-with.html#with
- http://learningelixir.joekain.com/learning-elixir-with/
- https://openmymind.net/Elixirs-With-Statement/
Analyzer
It will be necessary to use the analyzer to check that the with
form was indeed used, and that no alternatives (e.g. case
s) were used.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.