Packages

I am playing with publishing a package.

Current section

Files

Jump to
playground src playground.erl
Raw

src/playground.erl

-module(playground).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([main/0]).
-file("/Users/bradleymehder/Developer/Frameworks/Gleam/playground/src/playground.gleam", 117).
-spec begin_output(binary()) -> nil.
begin_output(Label) ->
gleam@io:println(<<"################################"/utf8>>),
gleam@io:println(Label).
-file("/Users/bradleymehder/Developer/Frameworks/Gleam/playground/src/playground.gleam", 122).
-spec end_output() -> nil.
end_output() ->
gleam@io:println(<<"################################ \n"/utf8>>).
-file("/Users/bradleymehder/Developer/Frameworks/Gleam/playground/src/playground.gleam", 16).
-spec main() -> nil.
main() ->
begin_output(<<"// Shapes"/utf8>>),
_pipe = {rectangle, 32, 42},
_pipe@1 = shapes:shape_info(_pipe),
gleam@io:println(_pipe@1),
_pipe@2 = {rectangle, 32, 42},
_pipe@3 = shapes:shape_info(_pipe@2),
gleam@io:println(_pipe@3),
_pipe@4 = {circle, 32},
_pipe@5 = shapes:shape_info(_pipe@4),
gleam@io:println(_pipe@5),
_pipe@6 = {circle, 42},
_pipe@7 = shapes:shape_info(_pipe@6),
gleam@io:println(_pipe@7),
_pipe@8 = {square, 3.2},
_pipe@9 = shapes:shape_info(_pipe@8),
gleam@io:println(_pipe@9),
end_output(),
begin_output(<<"// Robot Simulator"/utf8>>),
_pipe@10 = robot_simulator:move(
south,
{position, 8, 4},
<<"LAAARRRALLLL"/utf8>>
),
gleam@io:debug(_pipe@10),
end_output(),
begin_output(<<"// Calculator"/utf8>>),
_pipe@11 = 32,
_pipe@12 = calculator:add(_pipe@11, 2),
_pipe@13 = calculator:subtract_by(_pipe@12, 3),
_pipe@14 = calculator:multiply(_pipe@13, 4),
_pipe@15 = calculator:divide_by(_pipe@14, 5),
_pipe@16 = gleam@int:to_string(_pipe@15),
gleam@io:println(_pipe@16),
end_output(),
begin_output(<<"HTTP Request"/utf8>>),
_pipe@17 = fetch:send_request(
<<"https://jsonplaceholder.typicode.com/posts/1"/utf8>>
),
gleam@io:println(_pipe@17),
end_output(),
begin_output(<<"// Rock, Paper, Scissors"/utf8>>),
Player_one = rock,
Player_two = paper,
_pipe@18 = rock_paper_scissors:play(Player_one, Player_two),
gleam@io:println(_pipe@18),
Player_one@1 = rock,
Player_two@1 = rock,
_pipe@19 = rock_paper_scissors:play(Player_one@1, Player_two@1),
gleam@io:println(_pipe@19),
Player_one@2 = scissors,
Player_two@2 = paper,
_pipe@20 = rock_paper_scissors:play(Player_one@2, Player_two@2),
gleam@io:println(_pipe@20),
end_output(),
begin_output(<<"// RNA Transcription"/utf8>>),
_pipe@21 = <<"CGTA"/utf8>>,
_pipe@22 = rna_transcription:to_rna(_pipe@21),
_pipe@23 = gleam@result:unwrap(_pipe@22, <<"Invalide Input"/utf8>>),
gleam@io:println(_pipe@23),
_pipe@24 = <<"CGTAB"/utf8>>,
_pipe@25 = rna_transcription:to_rna(_pipe@24),
_pipe@26 = gleam@result:unwrap(_pipe@25, <<"Invalid DNA Input"/utf8>>),
gleam@io:println(_pipe@26),
end_output(),
begin_output(<<"// Winner, winner, chicken dinner"/utf8>>),
_pipe@27 = winner:choose_winner(),
gleam@io:println(_pipe@27),
end_output(),
begin_output(<<"// Add Pairs"/utf8>>),
Xss1 = [[1, 2], [2, 3], [3, 4]],
Xss2 = [[3, 6], [0, 5], [6, 2]],
_pipe@28 = add_pairs:add_pairs(Xss1),
_pipe@29 = gleam@int:to_string(_pipe@28),
gleam@io:println(_pipe@29),
_pipe@30 = add_pairs:add_pairs(Xss2),
_pipe@31 = gleam@int:to_string(_pipe@30),
gleam@io:println(_pipe@31),
end_output(),
begin_output(<<"// Group by Odds and Evens"/utf8>>),
_pipe@32 = group_by_odds_and_evens:group_by_odds_and_evens(
[1, 2, 3, 4, 5, 32]
),
gleam@io:debug(_pipe@32),
end_output().