Created
May 3, 2018 21:28
-
-
Save olbrichj/38cf525e4dd570c6c2e8d805265ed639 to your computer and use it in GitHub Desktop.
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
et number = UInt32(Calendar.current.component(.weekday, from: Date())) | |
let msg = ["D", "(", "o", "o", "#", "(", "w", "k", "h", "#", "e", "(", "h", "v", "w", "!", "(", "#", "d", "q", "(", "g", "#", "n", "h", "h", ")", "s", "#", "r", "!", "q", "#", "h", "y", "d", "!", "o", "x", "d", "w", "(", "l", "q", "j"] | |
print(msg.filter{$0.unicodeScalars.map{$0.value}.reduce(0, +) > 64 | |
|| $0.unicodeScalars.map{$0.value}.reduce(0, +) == 35}.map{ | |
Character(UnicodeScalar($0.unicodeScalars.map{$0.value}.reduce(0, +) | |
- number)!)}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment