Skip to content

Commit 0bfc0c9

Browse files
committed
Implements Array+Notes
1 parent f896928 commit 0bfc0c9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Foundation
2+
import Networking
3+
4+
5+
/// Extension: [Array of NoteBlock Elements]
6+
///
7+
extension Array where Element == Networking.NoteBlock {
8+
9+
/// Returns the first NoteBlock of the given kind.
10+
///
11+
func first(ofKind kind: NoteBlock.Kind) -> NoteBlock? {
12+
return first { $0.kind == kind }
13+
}
14+
}

0 commit comments

Comments
 (0)