Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Rot-13/E/rot-13.e
Normal file
12
Task/Rot-13/E/rot-13.e
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
pragma.enable("accumulator")
|
||||
|
||||
var rot13Map := [].asMap()
|
||||
for a in ['a', 'A'] {
|
||||
for i in 0..!26 {
|
||||
rot13Map with= (a + i, E.toString(a + (i + 13) % 26))
|
||||
}
|
||||
}
|
||||
|
||||
def rot13(s :String) {
|
||||
return accum "" for c in s { _ + rot13Map.fetch(c, fn{ c }) }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue