def abs(number) when number > 0, do: number def abs(number), do: -number
f x | x > 0 = 1 | otherwise = 0
Languages with Runtime Guards include Elixir, Haskell
Read more about Runtime Guards on the web: 1.
HTML of this page generated by Features.ts
View source