Last active
April 18, 2016 15:19
-
-
Save futurepaul/8b99d502006cf8a67a93 to your computer and use it in GitHub Desktop.
The biblical flood, in Swift
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
let ๐ = "๐ถ๐บ๐ฑ๐ญ๐น๐ฐ๐ธ๐ฏ๐จ๐ป๐ท๐ฝ๐ฎ๐๐ต๐๐ด๐๐๐ผ๐ง๐ฆ๐ค๐ฅ๐ฃ๐๐๐ข๐๐๐๐๐๐๐๐ ๐๐ฌ๐ณ๐๐๐๐๐๐ ๐๐๐๐๐๐๐๐๐๐ฒ๐ก๐๐ซ๐ช๐๐๐ฉ" | |
var ๐ข: String[] = [] | |
for ๐ in ๐ { | |
switch ๐ { | |
case "๐", "๐", "๐", "๐": | |
for ๐ in 1...7 { | |
๐ข.append(๐ + ๐) | |
} | |
default: | |
๐ข.append(๐ + ๐) | |
} | |
} | |
๐ข | |
func ๐(๐ข: String[]) -> String { | |
var ๐ฉ = "" | |
for ๐๐๐ฑ in ๐ข { | |
๐ฉ += "๐ฉ" | |
} | |
return ๐ฉ | |
} | |
for ๐๐ in 1...40 { | |
๐(๐ข) | |
} | |
let ๐ = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Working version for Swift 2:
https://gist.github.com/skywinder/4688531c72897234dea3