I\'m brand new to Erlang. How do you do modulo (get the remainder of a division)? It\'s % in most C-like languages, but that designates a comment in Erlang.
Several
I used the following in elixir:
defp mod(x,y) when x > 0, do: rem(x, y); defp mod(x,y) when x < 0, do: rem(x, y) + y; defp mod(0,_y), do: 0
Please don't downvote this because it's another language than the question. We all live the dream, because we all have the beam.