Created
December 11, 2014 16:50
-
-
Save raphaelmor/1fc3a519a5489332d61f to your computer and use it in GitHub Desktop.
Behold !
This file contains hidden or 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
public init?(json: JSON) { | |
let optCoord = json["coordinates"] | |
let opt = optCoord.array?.map { jsonLineString in | |
jsonLineString.array?.map { jsonPosition in | |
jsonPosition.array?.map { | |
Double($0.doubleValue) | |
} ?? [] | |
} ?? [] | |
} | |
_lineStrings = opt ?? [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does TDD say simplest code that works ? or dirtiest ? can't remember.