Elixir max function
- defmodule Max do
- def max(), do: nil
- def max([x]), do: x
- def max([x, y]) when x > y, do: x
- def max([x, y]), do: y
- def max([head | tail]), do: max([head, max(tail)])
We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.
We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!
Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.