13 lines
326 B
Text
13 lines
326 B
Text
rot13: function [c][
|
|
lc: lower c
|
|
when.has: lc [
|
|
[|in? 'a'..'m'] -> return to :char (to :integer c) + 13
|
|
[|in? 'n'..'z'] -> return to :char (to :integer c) - 13
|
|
true -> return c
|
|
]
|
|
]
|
|
|
|
loop "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" 'ch
|
|
-> prints rot13 ch
|
|
|
|
print ""
|