switchsomePoint{case(0,0):println("(0, 0) is at the origin")case(_,0):println("(\(somePoint.0), 0) is on the x-axis")case(0,_):println("(0, \(somePoint.1)) is on the y-axis")case(-2...2,-2...2):println("(\(somePoint.0), \(somePoint.1)) is inside the box")default:println("(\(somePoint.0), \(somePoint.1)) is outside of the box")}
[^] # Re: Le futur te rattrape toujours
Posté par Troy McClure (site web personnel) . En réponse au journal Apple annonce Swift, son nouveau langage de programmation. Évalué à 4.
C'est pas ce genre de choses là, le filtrage ? :
( https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/Swift_Programming_Language/ControlFlow.html#//apple_ref/doc/uid/TP40014097-CH9-XID_161 )