Skip to content

Instantly share code, notes, and snippets.

@lancy
lancy / List.swift
Created March 27, 2016 10:20
Mutating Generic Enum Issue
enum List<Element> {
case End
indirect case Node(Element, next: List<Element>)
}
enum ListError: ErrorType {
case EndCannotAppendValue
}
extension List {
@lancy
lancy / APEFunctionalExtension.h
Created November 16, 2015 03:56
APEFunctionalExtension
//
// Created by Chenyu Lan on 9/4/14.
// Copyright (c) 2014 Fenbi. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSArray (APEFunctionalExtension)
- (NSArray *)map:(id (^)(id value))transformBlock;
@lancy
lancy / YTKAnimatingRequestAccessory.h
Created November 10, 2014 14:29
YTKAnimatingRequestAccessory
//
// YTKAnimatingRequestAccessory.h
// Ape_uni
//
// Created by Chenyu Lan on 10/30/14.
// Copyright (c) 2014 Fenbi. All rights reserved.
//
#import <Foundation/Foundation.h>