Skip to content

Instantly share code, notes, and snippets.

@olbrichj
Created May 3, 2018 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save olbrichj/38cf525e4dd570c6c2e8d805265ed639 to your computer and use it in GitHub Desktop.
Save olbrichj/38cf525e4dd570c6c2e8d805265ed639 to your computer and use it in GitHub Desktop.
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