Created
November 19, 2015 18:57
-
-
Save jamiepinkham/dd656da2c2aec737ce8e to your computer and use it in GitHub Desktop.
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
var str = "Hello, playground" | |
enum Transformer<T> { | |
typealias Transform = NSData -> T?; | |
} | |
let data = str.dataUsingEncoding(NSUTF8StringEncoding)! | |
let transformer = Transformer<String>.Transform { data in return String(data: data, encoding: NSUTF8StringEncoding) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment