mirror of
https://github.com/yattee/yattee.git
synced 2025-08-05 02:04:07 +00:00
Add Piped support
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
extension Array where Element: Equatable {
|
||||
func next(after element: Element) -> Element? {
|
||||
let idx = firstIndex(of: element)
|
||||
func next(after element: Element?) -> Element? {
|
||||
if element.isNil {
|
||||
return first
|
||||
}
|
||||
|
||||
let idx = firstIndex(of: element!)
|
||||
|
||||
if idx.isNil {
|
||||
return first
|
||||
|
Reference in New Issue
Block a user