Elixir 練習問題 ListsAndRecursion-3

今度の練習問題はカエサル暗号だ。

^o^ > iex practice_7_3.exs
Eshell V8.0  (abort with ^G)
Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> MyList.caesar('ryvkve', 13)
'elixir'

Elixir 練習問題 ListsAndRecursion-2

^o^ > iex practice_7_2.exs
Eshell V8.0  (abort with ^G)
Interactive Elixir (1.3.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> MyList.max([1,2,3,4,5])
5
iex(2)> MyList.max([5,4,3,2,1])
5