[Solved] Swift 4.2: what does the following declaration mean


It’s a tuple. Just like how an array has an index for an element, this variable can also be accessed using . operator followed by the index.

_digest.0
_digest.1

However, if you want to access them using using a name rather than the index, that is also possible. (You can still access it using the index)

private let _digest: (first: UInt64, second: UInt64)

_digest.first
_digest.second

For more on Tuples.

solved Swift 4.2: what does the following declaration mean