Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def caesar([], _), do: []
- def caesar([head | tail], shift) do
- [cypher(head, shift) | caesar(tail, shift)]
- end
- defp cypher(a, shift) when a in ?a..?z and a != 32 do
- 97+rem((a-97+shift), 26)
- end
- defp cypher( _, _) do
- ' '
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement