Skip to content

Instantly share code, notes, and snippets.

@FerumFlex
Created May 5, 2020 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FerumFlex/ba79e74d2983b50eeec370c55a4274af to your computer and use it in GitHub Desktop.
Save FerumFlex/ba79e74d2983b50eeec370c55a4274af to your computer and use it in GitHub Desktop.
-module(first).
-export([double/1,mult/2,area/3,square/1,treble/1]).
mult(X,Y) ->
X*Y.
double(X) ->
mult(2,X).
area(A,B,C) ->
S = (A+B+C)/2,
math:sqrt(S*(S-A)*(S-B)*(S-C)).
square(X) ->
mult(X, X).
treble(X) ->
square(X) * X.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment