Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt Willy TheEndIsNear

  • Rural Sourcing Inc
  • Albuquerque New Mexico
View GitHub Profile
View homework.erl
-module(homework).
-export([xOr1/2, xOr2/2,xOr3/2, maxThree/3,howManyEqual/3]).
% three ways to represent xOr.
xOr1(X, Y) ->
not X == Y.
xOr2(X, Y) ->
X =/= Y.
@TheEndIsNear
TheEndIsNear / first.erl
Created May 4, 2020
Solution for the first assignment
View first.erl
-module(first).
-export([double/1,mult/2,area/3,square/1,triple/1]).
mult(X,Y) ->
X*Y.
double(X) ->
mult(2,X).