Skip to content

Commit

Permalink
Fix link to block and procs section
Browse files Browse the repository at this point in the history
  • Loading branch information
ftarulla committed Mar 17, 2022
1 parent 58a9e5b commit 43a6cc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/tutorials/basics/70_collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ arr = ["Crystal", "A", "language", "for", "humans", "and", "computers"]
puts arr.any? &.empty? # => false
```

`&` refers to the value passed to the block. You can read more about it [here](https://crystal-lang.org/reference/latest/syntax_and_semantics/blocks_and_procs.html#short-one-parameter-syntax).
`&` refers to the value passed to the block. You can read more about it [here](../../syntax_and_semantics/blocks_and_procs.html#short-one-parameter-syntax).

**the long answer is: Yes! But ...**
the method [Enumerable#any?](https://github.com/crystal-lang/crystal/blob/932f193ae/src/enumerable.cr#L81) is not implemented using `Enumerable#reduce` but with `each` so to "break the loop" once we find an element that satisfies the condition.
Expand Down

0 comments on commit 43a6cc2

Please sign in to comment.