Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update conditions.md - every func #131

Merged
merged 2 commits into from
Dec 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/reference/conditions.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ For example, `every' 3 0 (fast 2)` will speed up the cycle on cycles 0,3,6,… w

With this in mind, setting the second argument of `every'` to `0` gives the equivalent `every` function. For example, `every 3` is equivalent to `every' 3 0`.

:::tip
The `every` functions can be used to silence a full cycle or part of a cycle by using `silent` or `mask "~"`. Mask provides additional flexibility to turn on/off individual steps.
:::

```haskell
d1 $ every 3 silent $ n "2 9 11 2" # s "hh27"
d1 $ every 3 (mask "~") $ n "2 9 10 2" # s "hh27"
d1 $ every 3 (mask "0 0 0 0") $ n "2 9 11 2" # s "hh27"
```

### foldEvery

```haskell
Expand Down