Skip to content

Commit

Permalink
& -> and
Browse files Browse the repository at this point in the history
Co-authored-by: Milton Mazzarri <[email protected]>
  • Loading branch information
novaugust and milmazz authored Jun 12, 2024
1 parent f612b1a commit 819f99a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/module_directives.cheatmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The number of "blocks" in Elixir means there are a large number of ways to write

We believe readability is enhanced by using the simplest api possible, whether we're talking about internal module function calls or standard-library macros.

### `case`, `if`, & `unless`
### `case`, `if`, and `unless`

We advocate for `case` and `if` as the first tools to be considered for any control flow as they are the two simplest blocks. If a branch _can_ be expressed with an `if` statement, it _should_ be. Otherwise, `case` is the next best choice. In situations where developers might reach for an `if/elseif/else` block in other languages, `cond do` should be used.

Expand Down

0 comments on commit 819f99a

Please sign in to comment.