Skip to content

Instantly share code, notes, and snippets.

// ------------------------------------
// Network
// ------------------------------------
struct MeetupResponse {
var groupName: String = ""
var groupOrganizers: [String] = []
var meetupTitle: String = ""
var meetupAttendes: Int = 0
import Cocoa
enum CoroutineState {
case Fresh, Running, Blocked, Canceled, Done
}
struct CoroutineCancellation: ErrorType {}
class CoroutineImpl<InputType, YieldType> {
let body: (yield: YieldType throws -> InputType) throws -> Void
import Foundation
// A bunch of convenience things
func const <A, B> (b: B) -> A -> B {
return { _ in b }
}
func repeat <A> (n: Int) -> A -> [A] {
return { a in
return map(Array(1...n), const(a))
}
@chriseidhof
chriseidhof / :(
Created November 4, 2014 10:41 — forked from kostiakoval/:(
import Foundation
import ImageIO
infix operator >>= { associativity left }
func >>=<A,B>(l: A?, r: A -> B?) -> B? {
if let x = l {
return r(x)
}
return nil

Hi, I'll write a post about NSSpain on my blog when it finishes, but until then I want to go completing this gist with all the available stuff about the event (slides, videos, etc.).

If you are a speaker or want to add some material, don't hesitate to send me a pull request or ping me on Twitter :)

TV & another media

  • RTVE - Informativo Telerioja | Video.
{-# LANGUAGE OverloadedStrings, TemplateHaskell, EmptyDataDecls, TypeFamilies #-}
module Main where
import Debug.Trace (trace)
import Happstack.Server
import Web.Routes.Site
import Web.Routes.PathInfo (PathInfo (..), parseSegments)
import Web.Routes.Happstack