Skip to content
Merged
Changes from 2 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
7 changes: 4 additions & 3 deletions src/ch04-03-slices.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
## The Slice Type

*Slices* let you reference a contiguous sequence of elements in a collection
rather than the whole collection. A slice is a kind of reference, so it does
not have ownership.
*Slices* are a kind of reference, which lets you access a contiguous sub-sequence
of elements in a sequential [collection](ch08-00-common-collections.md).
Because slices are a kind of reference, they too can borrow access to memory, but
not own it.

Here’s a small programming problem: write a function that takes a string of
words separated by spaces and returns the first word it finds in that string.
Expand Down