(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import Darwin | |
| @dynamicMemberLookup | |
| struct Environment { | |
| subscript(dynamicMember name: String) -> String? { | |
| get { | |
| guard let value = getenv(name) else { return nil } | |
| return String(validatingUTF8: value) | |
| } |
| import Darwin | |
| /// A type-erasing cancellable object that executes a provided closure when canceled. | |
| /// | |
| /// Subscriber implementations can use this type to provide a “cancellation token” that makes it possible for a caller to cancel a publisher, but not to use the ``Subscription`` object to request items. | |
| /// | |
| /// An ``AnyCancellable`` instance automatically calls ``Cancellable/cancel()`` when deinitialized. | |
| @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) | |
| final public class AnyCancellable : Cancellable, Hashable { |
| import Combine | |
| import CoreFoundation | |
| import CoreGraphics | |
| import CoreText | |
| import Darwin | |
| import Foundation | |
| import SwiftUI | |
| import UIKit | |
| import os.log | |
| import os |
| // | |
| // RetryWhen.swift | |
| // CombineSandbox | |
| // | |
| // Created by Daniel Tartaglia on 9/27/19. | |
| // Copyright © 2019 Daniel Tartaglia. MIT License. | |
| // | |
| import Foundation | |
| import Combine |