slidenumber: true autoscale: true
This file contains hidden or 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
{-# LANGUAGE GeneralisedNewtypeDeriving #-} | |
module Data where | |
type UserName = String | |
data DataResult = DataResult String | |
deriving (Eq, Show) | |
class Monad m => Cache m where |
This file contains hidden or 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
protocol Functor { | |
associatedtype Tag | |
associatedtype E //Element or _Element clashes on Dictionary :( | |
} | |
struct Functoring<F: Functor> { | |
let _map: (F, (F.E) -> Any) -> Any | |
func map<FB: Functor>(_ functor: F, transform: (F.E) -> FB.E) -> FB where F.Tag == FB.Tag { | |
return _map(functor, transform) as! FB | |
} | |
} |
This file contains hidden or 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
//#! Swift 5 | |
import Foundation | |
import AppKit | |
//////////////////////////////////////////////////////////////////// | |
//: ## Type Definition | |
struct AttrString { | |
let attributedString: NSAttributedString |
NOTE: This is an article by Chris Taylor, originally posted on his blog, but the blog was removed at some point. I resurected it from the WayBack Machine without the authors permission, but post it here for posterity's sake, so others may be able to find it.
by Chris Taylor
FEB 10TH, 2013
This file contains hidden or 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
/*: | |
# Seemingly Impossible Swift Programs | |
*/ | |
/*: | |
# 1.) Completely possible programs | |
*/ | |
[1, 2, 3] | |
.allSatisfy { $0 >= 2 } | |
[1, 2, 3] |
This file contains hidden or 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
// | |
// VideoMediaInput.swift | |
// GenerateMetal-iOS | |
// | |
// Created by Omar Juarez Ortiz on 2018-11-28. | |
// Copyright © 2018 All rights reserved. | |
// | |
import Foundation | |
import UIKit |
This file contains hidden or 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
{ | |
"BTTWidgetName" : "RAM", | |
"BTTTriggerType" : 642, | |
"BTTTriggerTypeDescription" : "Shell Script \/ Task Widget", | |
"BTTTriggerClass" : "BTTTriggerTypeTouchBar", | |
"BTTPredefinedActionType" : -1, | |
"BTTPredefinedActionName" : "No Action", | |
"BTTShellScriptWidgetGestureConfig" : "\/bin\/bash:::-c", | |
"BTTEnabled2" : 1, | |
"BTTUUID" : "D231439F-67B4-4A08-8DDA-0FFE6650A68F", |
This file contains hidden or 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
{ | |
"BTTWidgetName" : "CPU", | |
"BTTTriggerType" : 642, | |
"BTTTriggerTypeDescription" : "Shell Script \/ Task Widget", | |
"BTTTriggerClass" : "BTTTriggerTypeTouchBar", | |
"BTTPredefinedActionType" : -1, | |
"BTTPredefinedActionName" : "No Action", | |
"BTTShellScriptWidgetGestureConfig" : "\/bin\/bash:::-c", | |
"BTTEnabled2" : 1, | |
"BTTUUID" : "2242BFF7-6346-4EBF-AE18-407E91CFEA57", |