Skip to content

Instantly share code, notes, and snippets.

Rowinson Gallego rwngallego

  • Derivco Sweden
  • Stockholm, Sweden
Block or report user

Report or block rwngallego

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lists_module.erl
-module(lists_module).
-export([product/1, maximum/1, product_t/1, maximum_t/1]).
% direct
product([]) ->
1;
product([H|T]) ->
H*product(T).
@rwngallego
rwngallego / all_together.erl
Created Mar 9, 2017
This is the final assessment for the first week - Functional Erlang. Testing: https://gist.github.com/rwngallego/1a516188a3542dd5ec46c855c89ef0e5
View all_together.erl
% Functional programming Erlang 1 - Assignment
%
% Author: Rowinson G.
% For testing use this gist: https://gist.github.com/rwngallego/1a516188a3542dd5ec46c855c89ef0e5
-module(all_together).
-export([perimeter/1, area/1, enclose/1, bits/1, bits_tail/1]).
%%%%%% Shapes %%%%%%%
@rwngallego
rwngallego / test_all_together.erl
Last active Mar 9, 2017
Testing the all_together.erl file
View test_all_together.erl
%%%%%% Testing %%%%%%
% Copy and paste the following content into the erl console
Circle = {circle, 45}.
Rectangle = {rectangle, 5, 7}.
RightTriangle = {right_triangle, 3, 4, 5}.
all_together:perimeter(Circle).
all_together:perimeter(Rectangle).
all_together:perimeter(RightTriangle).
all_together:area(Circle).
You can’t perform that action at this time.