Last active
May 21, 2018 13:31
-
-
Save Adzz/08a86eb58183eeae765ed6480a3b2507 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Circle do | |
defstruct [:radius] | |
def area(%Circle{radius: radius}) do | |
radius * radius * 3.14 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment