Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneFlesselle committed Oct 4, 2024
1 parent 12eb487 commit 6a971b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/_docs/reference/other-new-features/named-tuples.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ NamedTuple[("name", "age"), (String, Int)]

A `NamedTuple[N, V]` type is publicly known to be a supertype (but not a subtype) of its value paramater `V`, which means that regular tuples can be assigned to named tuples but not _vice versa_.

The `NamedTuple` object contains a number of extension methods for named tuples hat mirror the same functions in `Tuple`. Examples are
The `NamedTuple` object contains a number of extension methods for named tuples that mirror the same functions in `Tuple`. Examples are
`apply`, `head`, `tail`, `take`, `drop`, `++`, `map`, or `zip`.
Similar to `Tuple`, the `NamedTuple` object also contains types such as `Elem`, `Head`, `Concat`
that describe the results of these extension methods.
Expand All @@ -154,7 +154,7 @@ that `c: C`, and that `n` is not otherwise legal as a name of a selection on `c`
Then `c.n` is a legal selection, which expands to `c.selectDynamic("n").asInstanceOf[T]`.

It is the task of the implementation of `selectDynamic` in `C` to ensure that its
computed result conforms to the predicted type `T`
computed result conforms to the predicted type `T`.

As an example, assume we have a query type `Q[T]` defined as follows:

Expand Down
2 changes: 1 addition & 1 deletion library/src-bootstrapped/scala/NamedTuple.scala
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ object NamedTupleDecomposition:
/** The named tuple consisting of all elements of this tuple in reverse */
inline def reverse: Reverse[NamedTuple[N, V]] = x.toTuple.reverse

/** The named tuple consisting of all elements values of this tuple zipped
/** The named tuple consisting of all element values of this tuple zipped
* with corresponding element values in named tuple `that`.
* If the two tuples have different sizes,
* the extra elements of the larger tuple will be disregarded.
Expand Down

0 comments on commit 6a971b1

Please sign in to comment.