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
// LEARNING CURRYING | |
struct structA { | |
let a:Int | |
let b:Int | |
init(a:Int, b:Int) { | |
self.a = a | |
self.b = b | |
} | |
} |
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
// | |
// MultiDirectionAdjudicatingScrollView.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 12/16/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit | |
import UIKit.UIGestureRecognizerSubclass |
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
#!/usr/bin/perl -w | |
use strict; | |
# Makefile generator for quick compilation of Swift projects | |
# By: Roopesh Chander | |
# Thanks: Andy Matuschak | |
# Works only for swift-only projects. | |
# Usage: | |
# > perl makemake.pl | |
# > make |
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
class FooViewController: UIViewController { | |
let name: String | |
init(_ coder: NSCoder? = nil) { | |
name = "Bar" | |
if let coder = coder { | |
super.init(coder: coder) | |
} else { | |
super.init(nibName: nil, bundle:nil) |
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
// | |
// RACSignal+Extensions.swift | |
// ReactiveSwiftFlickrSearch | |
// | |
// Created by Colin Eberhardt on 15/07/2014. | |
// Copyright (c) 2014 Colin Eberhardt. All rights reserved. | |
// | |
import Foundation |
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
AnonymousFunction( { (number: Int) -> Bool in number < 0 } ) | |
AnonymousFunction { (number: Int) -> Bool in number < 0 } | |
AnonymousFunction { (number) -> Bool in number < 0 } | |
AnonymousFunction { number -> Bool in number < 0 } | |
AnonymousFunction { number in number < 0 } | |
AnonymousFunction { $0 < 0 } |