Skip to content

Instantly share code, notes, and snippets.

View d5lment's full-sized avatar
🤖

Miriam Paola Reyes Garcia d5lment

🤖
View GitHub Profile
@d5lment
d5lment / recursion.erl
Created May 14, 2020 04:40
Exercises to demonstrate my capability to use recursion :P
-module(recursion).
-export([fac/1, fib/1, pieces/1]).
%Factorial
fac(0) ->
1;
fac(N) ->
fac(N-1)*N.
@koudelka
koudelka / gist:f4d07b9d998d723e55a0
Created June 6, 2014 20:52
Possible http status codes module for Elixir Phoenix Web Framework
#
# Would this be useful to Phoenix?
#
# In controllers, it'd be nice to be able to refer to status codes as atoms instead of integers.
#
defmodule Phoenix.Controller.StatusCodes do
@http_status_codes %{