Skip to content

Instantly share code, notes, and snippets.

@mkumm
Created June 22, 2017 01:22
Show Gist options
  • Save mkumm/f4ca7d4893ae60607ece98f6a83b1121 to your computer and use it in GitHub Desktop.
Save mkumm/f4ca7d4893ae60607ece98f6a83b1121 to your computer and use it in GitHub Desktop.
-module(second).
-export([hyp/2, perimeter/2, area/2]).
-import(first, [square/2,mult/2]).
% Just to show I know what a comment is ;)
hyp(A,B) ->
math:sqrt(first:square(A) + first:square(B)).
perimeter(A,B) ->
A + B + hyp(A,B).
area(A,B) ->
first:mult(A,B) / 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment