- Proposal: SE-NNNN
- Author(s): Erica Sadun
- Status: Review
- Review manager: TBD
The C-style for-loop
appears to be a mechanical carry-over from C rather than a
The C-style for-loop
appears to be a mechanical carry-over from C rather than a
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
public struct Promise<T> { | |
typealias Fulfiller = (T) -> (Void) | |
typealias Rejecter = (Void) -> (Void) | |
typealias Resolver = (_ fulfill: @escaping Fulfiller, _ reject: @escaping Rejecter) -> (Void) | |
let resolver: Resolver | |
init(_ resolver: @escaping Resolver){ | |
self.resolver = resolver | |
} | |
func then<U>(_ execute: @escaping ((T) -> U)) -> Promise<U> { | |
return Promise<U>({(fulfill, reject) in |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
import Foundation | |
/// FuzzySearchCharacters is used to normalise strings | |
struct FuzzySearchCharacter { | |
let content: String | |
// normalised content is referring to a string that is case- and accent-insensitive | |
let normalisedContent: String | |
} | |
/// FuzzySearchString is just made up by multiple characters, similar to a string, but also with normalised characters |