This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
// MARK: - IMPLEMENTATION | |
extension Array where Element: Comparable & Hashable { | |
// MARK: Internal | |
/// Solves the problem as requested | |
/// - Returns The wave sorted array | |
func solve() -> [Element] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Demo.swift | |
// bedtimefanlite | |
// | |
// Created by Sofia Chevrolat on 02/11/2021. | |
// Inspired by [Dave DeLong's post](https://davedelong.com/blog/2021/10/09/simplifying-backwards-compatibility-in-swift/) | |
// | |
// Two small examples of a "backport" implementation to facilitate backward compatibility. | |
// | |
// USAGE : |