## _Neue Lern- und Partizipationsformen_
Workshop auf dem Sozialpolitischen Fachkongress des ASB am 26. April 2013 | Henning Wötzel-Herber
Workshop auf dem Sozialpolitischen Fachkongress des ASB am 26. April 2013 | Henning Wötzel-Herber
| enum Sum<L,R> { | |
| case Left(@auto_closure () -> L) | |
| case Right(@auto_closure () -> R) | |
| } | |
| protocol GShow { | |
| func gshow() -> String | |
| } | |
| extension String : GShow { |
| enum PageType { | |
| case Markdown | |
| case HTML | |
| case XML | |
| } | |
| extension PageType : DebugPrintable { | |
| var debugDescription : String { | |
| switch self { | |
| case .Markdown: return "Markdown" |
| id nilResultAfterTimeOut(int64_t timeoutInNanoSeconds, ResultBlock block) { | |
| dispatch_semaphore_t semaphore = dispatch_semaphore_create(0); | |
| dispatch_time_t timeoutTime = dispatch_time(DISPATCH_TIME_NOW, timeoutInNanoSeconds); | |
| __block id result = nil; | |
| dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
| dispatch_async(queue, ^{ | |
| result = block(); | |
| dispatch_semaphore_signal(semaphore); | |
| }); |
| enum Either<A,B> { | |
| case Left(A) | |
| case Right(B) | |
| } | |
| // Not sure about which cases this should have... | |
| enum Async<A> { | |
| case Delayed(() -> Async<A>) | |
| case Result(A) | |
| case Failure(NSError) |
| 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 |
| 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)) | |
| } |
One
var x = hello
World
TestI'm collecting a list of articles which use a photo of me as a programmer. Alper took this photo and released it under Creative Commons. Now all the lazy reporters are using it.
| // | |
| // main.swift | |
| // MCE | |
| // | |
| // Created by Chris Eidhof on 05/02/15. | |
| // Copyright (c) 2015 Chris Eidhof. All rights reserved. | |
| // | |
| import Foundation |