This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module my_lists. | |
%% seq(Min, Max) -> [Min,Min+1, ..., Max] | |
%% seq(Min, Max, Incr) -> [Min,Min+Incr, ..., Max] | |
%% returns the sequence Min..Max | |
%% Min <= Max and Min and Max must be integers | |
-export [seq/2, seq/3]. | |
-spec seq(From, To) -> Seq when | |
From :: integer(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(my_lists). | |
-export([seq/2, seq/3]). | |
%% seq(Min, Max) -> [Min,Min+1, ..., Max] | |
%% seq(Min, Max, Incr) -> [Min,Min+Incr, ..., Max] | |
%% returns the sequence Min..Max | |
%% Min <= Max and Min and Max must be integers | |
-spec seq(From, To) -> Seq when |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1> code:load_file(sendmail). | |
=ERROR REPORT==== 10-Nov-2017::09:05:01 === | |
…/beam/sendmail.beam failed: badfile | |
=ERROR REPORT==== 10-Nov-2017::09:05:01 === | |
beam/beam_load.c(1159): Error loading module sendmail: | |
not a BEAM file: no IFF 'FOR1' chunk | |
{error,badfile} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(x). | |
-export([bad/1]). | |
bad(A) -> | |
B = case rand:uniform() of | |
C when C < 0.5 -> C; | |
D when D >= 0.5 -> 1 - D | |
end, | |
A + B - C. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(x). | |
-export([bad/1]). | |
bad(A) -> | |
B = case rand:uniform() of | |
C when C < 0.5 -> C; | |
D when D >= 0.5 -> 1 - D | |
end, | |
A + B. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(x). | |
-export([c/0, d/0, e/1]). | |
c() -> [x || id(nothing)]. | |
d() -> [x || nothing]. | |
e(X) -> [x || X]. | |
id(X) -> X. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module 'x' ['c'/0, | |
'd'/0, | |
'e'/1, | |
'module_info'/0, | |
'module_info'/1] | |
attributes [%% Line 1 | |
'file' = | |
%% Line 1 | |
[{[115|[114|[99|[47|[120|[46|[101|[114|[108]]]]]]]]],1}]] | |
'c'/0 = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(x). | |
-export([c/0, d/0]). | |
c() -> [x || id(nothing)]. | |
d() -> [x || nothing]. | |
id(X) -> X. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(x). | |
-export([x/0, y/0]). | |
id(X) -> X. | |
y() -> [x || id(nothing)]. | |
x() -> | |
Id = fun(X) -> X end, | |
[x || Id(nothing)]. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(base_server). | |
-type state() :: #{_ => _}. | |
-export([handle_info/2]). | |
-spec handle_info(term(), state()) -> {noreply, state()}. | |
handle_info(Msg, State) -> | |
error_logger:warning_msg("Unexpected Message: ~p", [Msg]), | |
{noreply, State}. |