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:
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 hereby claim:
To claim this, I am signing this object:
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> |
-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}. |
-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(hello). | |
-export([world/0]). | |
world() -> | |
F = fun() -> "Hello, world!" end, | |
F = fun() -> "Hello, world!" end, | |
io:format("~s~n", [F()]). |
-module(hello). | |
-export([world/0, f/0]). | |
world() -> | |
F = f(), | |
F = f(), | |
io:format("~s~n", [F()]). | |
f() -> fun() -> "Hello, world!" end. |
-module(hello). | |
-export([world/0, f/0, '-f/0-fun-0-'/0]). | |
world() -> | |
F = f(), | |
F = f(), | |
io:format("~s~n", [F()]). | |
f() -> fun() -> "Hello, world!" end. |
-module(people). | |
-export([count/2]). | |
-export([test/0]). | |
-type user() :: binary(). | |
-type country() :: atom(). | |
-type group() :: #{ country => country() | |
, members => [user()] | |
}. |
-spec count(country(), [group()]) -> non_neg_integer(). | |
count(Country, Groups) -> | |
lists:sum( | |
lists:map( | |
fun (#{country := Country, members := Members}) -> | |
length(Members); | |
(_) -> | |
0 | |
end, Groups)). |