Skip to content

Instantly share code, notes, and snippets.

Avatar

Krzysztof Siejkowski siejkowski

View GitHub Profile
View the exoplanets.swift
the.exoplanets
let us = say(
hello.world(
to: the.beam, of: light,
so: delicate,
that: i.fear(), to: blink(), while: looking().at
)
@siejkowski
siejkowski / vc_hierarchy.swift
Last active Jun 6, 2016
play with vc hierarchy
View vc_hierarchy.swift
import UIKit
protocol Action {}
struct ConcreteAction1 : Action {}
struct ConcreteAction2 : Action {}
enum ActionError : ErrorType {
View GlobalDayOfCodeRetreat2015.swift
import Foundation
func ==(lhs: Cell, rhs: Cell) -> Bool {
return lhs.hashValue == rhs.hashValue
}
struct Cell: Hashable {
let a: Int
let b: Int
View extension-extending-optional.swift
// Optionable protocol exposes the subset of functionality required for flatten definition
protocol Optionable {
typealias Wrapped
var value: Wrapped? { get }
}
// extension for Optional provides the implementations for Optional enum
extension Optional : Optionable {
var value: Wrapped? { get { return self } }
View keybase.md

Keybase proof

I hereby claim:

  • I am siejkowski on github.
  • I am siejkowski (https://keybase.io/siejkowski) on keybase.
  • I have a public key whose fingerprint is 8D26 591D 3FC0 E0FB 8E69 4DD3 5290 1436 EC39 7652

To claim this, I am signing this object:

View scalania_p11
def encodeModified(list: List[Symbol]) : List[Any] = {
list.foldRight(List[Any]()) {
(h, l) =>
if (l.isEmpty)
List(h)
else
l.head match {
case (x: Int, y) =>
if (y == h)
(x + 1, y) :: l.tail
You can’t perform that action at this time.