(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.
""" | |
MIT License | |
Copyright (c) 2017 Cyrille Rossant | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
(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.
// | |
// SpinlockTestTests.swift | |
// SpinlockTestTests | |
// | |
// Created by Peter Steinberger on 04/10/2016. | |
// Copyright © 2016 PSPDFKit GmbH. All rights reserved. | |
// | |
import XCTest |
/// Playground - noun: a place where people can play | |
/// I am the very model of a modern Judgement General | |
//: # Algorithm W | |
//: In this playground we develop a complete implementation of the classic | |
//: algorithm W for Hindley-Milner polymorphic type inference in Swift. | |
//: ## Introduction |
class AsyncOperation: Operation { | |
private(set) var taskHandle: Task.Handle<Void, Error>? | |
fileprivate enum State: Equatable { | |
case ready | |
case executing | |
case finished | |
} | |
fileprivate var state: State = .ready { |
import Combine | |
import SwiftUI | |
extension View { | |
public func focused<T>(file: StaticString = #file, _ state: FocusState<T>, equals value: T) -> some View { | |
modifier(FocusedModifier(state: state, id: value, file: file)) | |
} | |
} | |
@propertyWrapper |
import Dispatch | |
@globalActor | |
final actor MyMainActor { | |
// Don’t allow others to create instances | |
private init() {} | |
// Requirements from the implicit GlobalActor conformance | |
typealias ActorType = MyMainActor |
// | |
// VoronoiFlowGradient and the related sources | |
// Copyright (c) 2024 Astemir Eleev | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |