I hereby claim:
- I am tkersey on github.
- I am twk (https://keybase.io/twk) on keybase.
- I have a public key whose fingerprint is 53D0 44AE 9245 5BF9 ACB4 7ACF ACBE D759 C16F 62B7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Verifying myself: My Bitcoin username is +tk. https://onename.io/tk |
"fundamental constants of human-computer interaction", which can be split into the human and computer halves. | |
Very roughly: | |
~16 ms – frame budget for interactive animation | |
100 ms – user action feels instantaneous | |
200 ms – typical human reaction time | |
500+ ms – perceptible delay | |
3+ seconds – perceived sluggishness | |
10+ seconds – attention span is broken |
|ψ> = α|0> β|1> |
Verifying my Blockstack ID is secured with the address 1Pgb6MVcG9qhJ6Tnu86FPs5MtY1znYC3wP https://explorer.blockstack.org/address/1Pgb6MVcG9qhJ6Tnu86FPs5MtY1znYC3wP |
import Foundation | |
import UIKit | |
import PlaygroundSupport | |
// -------------------------------------------------------------------------------- | |
// MARK: - operators | |
// -------------------------------------------------------------------------------- | |
precedencegroup MonoidComposePrecedence { | |
associativity: left higherThan: AssignmentPrecedence lowerThan: AdditionPrecedence |
// This example shows how higher-kinded types can be emulated in Swift today. | |
// It acheives correct typing at the cost of some boilerplate, manual lifting and an existential representation. | |
// The technique below was directly inspired by the paper Lightweight Higher-Kinded Polymorphism | |
// by Jeremy Yallop and Leo White found at http://ocamllabs.io/higher/lightweight-higher-kinded-polymorphism.pdf | |
/// `ConstructorTag` represents a type constructor. | |
/// `Argument` represents an argument to the type constructor. | |
struct Apply<ConstructorTag, Argument> { | |
/// An existential containing a value of `Constructor<Argument>` | |
/// Where `Constructor` is the type constructor represented by `ConstructorTag` |
const I = x => x; | |
const K = x => y => x; | |
const A = f => x => f(x); | |
const T = x => f => f(x); | |
const W = f => x => f(x)(x); | |
const C = f => y => x => f(x)(y); | |
const B = f => g => x => f(g(x)); | |
const S = f => g => x => f(x)(g(x)); | |
const P = f => g => x => y => f(g(x))(g(y)); | |
const Y = f => (g => g(g))(g => f(x => g(g)(x))); |