Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
When you use function name without "&" symbol, Elixir will try to run it. Passing
convert/1
without "&" symbol will casue the following error:function convert/0 is undefined or private
.The "&" symbol is named the capture operator. It allows for named functions to be assigned to variables or passed as the arguments. When using it you have to define specific arity of the function.
You can read more about it on https://elixir-lang.org/getting-started/modules-and-functions.html#function-capturing
I think, this solution is not iterating through the alphabet. It gets the binary value for each character in
s
, and substracts the binary value of a (?a
).woops, replied to wrong comment, how to delete?