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 Foundation | |
import UserNotifications | |
import Combine | |
import CoreLocation | |
public struct UserNotificationClient { | |
public var add: (UNNotificationRequest) -> AnyPublisher<Void, Error> | |
public var getAuthStatus: () -> AnyPublisher<UNAuthorizationStatus, Never> | |
public var getDeliveredNotifications: () -> AnyPublisher<[Notification], Never> | |
public var getNotificationCategories: () -> AnyPublisher<Set<UNNotificationCategory>, Never> |
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
/// Translation of [Peter Norvig's spell checker](http://norvig.com/spell-correct.html) into Swift 3. | |
/// Sample input corpus [here](http://norvig.com/big.txt) | |
/// Swift 2 version: https://gist.github.com/airspeedswift/6d8c9d95f0d812f58be3 | |
import Foundation // purely for IO, most things done with Swift.String | |
/// Given a word, produce a set of possible alternatives with | |
/// letters transposed, deleted, replaced or rogue characters inserted | |
func edits(word: String) -> Set<String> { | |
if word.isEmpty { return [] } |
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
// | |
// GIFDownloader.h | |
// TheJoysOfCode | |
// | |
// Created by Bob on 29/10/12. | |
// Copyright (c) 2012 Tall Developments. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |