View Tests.swift
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
// uses https://gist.github.com/danielt1263/bd449100764e3166644f7a38bca86c96 | |
import RxSwift | |
import RxTest | |
import XCTest | |
final class ExampleTests: XCTestCase { | |
func test_merge_second_finishes_faster() { | |
let scheduler = TestScheduler(initialClock: 0) | |
let args = scheduler.createObserver(Device.self) |
View AccumulatingDebounce.swift
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
// | |
// AccumulatingDebounce.swift | |
// | |
// Created by Daniel Tartaglia on 10 Mar 2023. | |
// Copyright © 2023 Daniel Tartaglia. MIT License. | |
// | |
import Foundation | |
import RxSwift |
View Combinators.swift
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
func apply<A, B>(fn: (A) -> B, a: A) -> B { | |
fn(a) | |
} | |
func bluebird<A, B, C>(fn1: (A) -> B, fn2: (C) -> A, c: C) -> B { | |
fn1(fn2(c)) | |
} | |
func blackbird<A, B, C, D>(fn1: (C) -> D, fn2: (A, B) -> C, a: A, b: B) -> D { |
View Restart.swift
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
// | |
// Restart.swift | |
// | |
// Created by Daniel Tartaglia on 23 Jun 2022. | |
// Copyright © 2022 Daniel Tartaglia. MIT License. | |
// | |
import RxSwift | |
extension ObservableType { |
View ActivityTracker.swift
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
// | |
// ActivityTracker.swift | |
// | |
// Created by Daniel Tartaglia on 05 Dec 2021. | |
// Copyright © 2021 Daniel Tartaglia. MIT License. | |
// | |
extension Publisher { | |
func trackActivity(_ activityTracker: ActivityTracker) -> AnyPublisher<Output, Failure> { | |
activityTracker.trackActivity(of: self) |
View CycleExample.swift
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 Cause_Logic_Effect | |
import RxCocoa | |
import RxSwift | |
import RxSwiftExt | |
import UIKit | |
final class ViewController: UIViewController { | |
var tableView: UITableView! | |
var logoutButton: UIButton! | |
let disposeBag = DisposeBag() |
View CLE-Counter.playground
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
//: A UIKit based Playground for presenting user interface | |
import UIKit | |
import RxSwift | |
import RxCocoa | |
import PlaygroundSupport | |
import Cause_Logic_Effect | |
PlaygroundPage.current.liveView = CounterViewController().configure { $0.connect() } |
View TestScheduler+MarbleTests.swift
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
// | |
// TestScheduler+MarbleTests.swift | |
// | |
// Created by Daniel Tartaglia on 31 October 2021. | |
// Copyright © 2022 Daniel Tartaglia. MIT License. | |
// | |
import Foundation | |
import RxSwift | |
import RxTest |
View PublisherResultTransforms.swift
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
// | |
// PublisherResultTransforms.swift | |
// rx-sandbox | |
// | |
// Created by Daniel Tartaglia on 9/19/21. | |
// | |
import Combine | |
/** |
NewerOlder