/
githubmirror
/
julia
Обзор
Документация
Войти
/
githubmirror
/
julia
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
test/project/Rot13/src/Rot13.jl
28 строк
477 B
Kristoffer Carlsson
allow `-m` to run the entry point in a submodule (#55265)
31 авг 2024, 14:47
Не верифицирован
31 авг 2024, 14:47
ca72e28
Код
Авторство
О чём код?
module Rot13 function rot13(c::Char) shft = islowercase(c) ? 'a' : 'A' isletter(c) ? c = shft + (c - shft + 13) % 26 : c end rot13(str::AbstractString) = map(rot13, str) function (@main)(args) foreach(arg -> print(rot13(arg), " "), args) return 0 end module Rot26 # LOL import ..rot13 rot26(str::AbstractString) = map(rot13 ∘ rot13, str) function (@main)(args) foreach(arg -> print(rot26(arg), " "), args) return 0 end end end # module Rot13