I hereby claim:
- I am elbrujohalcon on github.
- I am elbrujohalcon (https://keybase.io/elbrujohalcon) on keybase.
- I have a public key whose fingerprint is CD9E 3C5B 5E58 3B30 5B30 6345 0550 3C28 3EA2 012F
To claim this, I am signing this object:
-module(hello). | |
-export([world/0]). | |
world() -> | |
F = fun() -> "Hello, world!" end, | |
F = fun() -> "Hello, world!" end, | |
io:format("~s~n", [F()]). |
-module(dumb_math). | |
-export([dup/1, init/1]). | |
dup(X) -> | |
case gen_server:start_link(dumb_math, X, []) of | |
{ok, Pid} -> sys:get_state(Pid); | |
{error, Reason} -> Reason | |
end. | |
init(X) when is_number(X) -> {ok, X * 2}; |
-module(dumb_math). | |
-export([dup/1, init/1]). | |
dup(X) -> | |
{ok, Pid} = gen_server:start_link(dumb_math, X, []), | |
sys:get_state(Pid). | |
init(X) -> {ok, X * 2}. |
3> Fun = fun() -> ok end, | |
3> Fun = fun() -> ok end. | |
** exception error: no match of right hand side value #Fun<erl_eval.20.54118792> | |
4> Fun = fun() -> ok end. | |
#Fun<erl_eval.20.54118792> | |
5> Fun = fun() -> ok end. | |
#Fun<erl_eval.20.54118792> |
I hereby claim:
To claim this, I am signing this object:
Bad = [67,108,111,110,105,110,103,32,105,110,116,111,32,39,47,112,114,105,118,97,116,101,47,116,109,112,47,103,97,100,103,101,116,47,103,97,100,103,101,116,45,116,101,115,116,47,111,114,103,45,114,101,112,111,47,48,48,48,49,52,50,53,45,48,53,56,51,51,51,56,45,48,52,48,48,55,49,53,47,100,101,112,115,47,101,112,101,114,39,46,46,46,10,67,108,111,110,105,110,103,32,105,110,116,111,32,39,47,112,114,105,118,97,116,101,47,116,109,112,47,103,97,100,103,101,116,47,103,97,100,103,101,116,45,116,101,115,116,47,111,114,103,45,114,101,112,111,47,48,48,48,49,52,50,53,45,48,53,56,51,51,51,56,45,48,52,48,48,55,49,53,47,100,101,112,115,47,115,121,110,99,39,46,46,46,10,67,108,111,110,105,110,103,32,105,110,116,111,32,39,47,112,114,105,118,97,116,101,47,116,109,112,47,103,97,100,103,101,116,47,103,97,100,103,101,116,45,116,101,115,116,47,111,114,103,45,114,101,112,111,47,48,48,48,49,52,50,53,45,48,53,56,51,51,51,56,45,48,52,48,48,55,49,53,47,100,101,112,115,47,107,97,116,97,110,97,39,46,46,46,10,67,108,111,110,105,110,103,32,10 |
%% I like this way… | |
1> MultiplePrint = partial(fun lists:zipwith/3, [fun io:format/2]). | |
#Fun<erl_eval.12.90072148> | |
2> Salute = partial(MultiplePrint, [["hello ~s!~n", "goodbye ~s!~n"]]). | |
#Fun<erl_eval.6.90072148> | |
3> Salute([["@bipthelin"], ["@elbrujohalcon"]]). | |
hello @bipthelin! | |
goodbye @elbrujohalcon! | |
[ok,ok] |
%% I would argue that | |
HTTP11Headers = case {Transport, Version} of | |
{cowboy_spdy, 'HTTP/1.1'} -> | |
[{<<"connection">>, atom_to_connection(Connection)}]; | |
{_, _} -> | |
[] | |
end | |
%% is clearer and more flexible for future improvement if needed than | |
HTTP11Headers = if |
Using this elvis.config file:
$ cat elvis.config
[
{
elvis,
[
{config,
#{src_dirs => ["src"],
rules => [{elvis_style, line_length, [80]},
-module(my_life). | |
-export ([my_life/1]). | |
-record(place, {id, moments}). | |
-record(moment, {id, friends, lovers, meaning}). | |
-record(person, {id, love_level}). | |
-author(john). | |
-author(paul). | |
-author(george). |