June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -1,8 +1,8 @@
fun caesar(s, k, decode: false):
if decode: k = 26 - k
join(char((ord(c) - 65 + k) % 26 + 65) | c in s.upper() where "a" <= c <= "A")
char({(ord(c) - 65 + k) mod 26 + 65) | c in s.upper() where "a" <= c <= "A"}).join()
let msg = "The quick brown fox jumped over the lazy dogs"
print msg
let enc = caesar(msg, 11)
print ..(enc) ..(caesar(enc, 11, decode: true))
print~(enc)~(caesar(enc, 11, decode: true))