diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-06-25 22:48:07 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-06-25 22:48:07 +0100 |
commit | 2c2541750ca4b7b604070c75c18d84be833c97d5 (patch) | |
tree | f5e63d941a1c7e2c2d4dff1d81c43fa2766308ae /gen/src/gleam@int.erl | |
parent | 96c20b8ebf8420fbba75c97fa08eaeb34e8dc394 (diff) | |
download | gleam_stdlib-2c2541750ca4b7b604070c75c18d84be833c97d5.tar.gz gleam_stdlib-2c2541750ca4b7b604070c75c18d84be833c97d5.zip |
stdlib namespace std -> gleam
Diffstat (limited to 'gen/src/gleam@int.erl')
-rw-r--r-- | gen/src/gleam@int.erl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gen/src/gleam@int.erl b/gen/src/gleam@int.erl new file mode 100644 index 0000000..49641a6 --- /dev/null +++ b/gen/src/gleam@int.erl @@ -0,0 +1,28 @@ +-module(gleam@int). +-compile(no_auto_import). + +-export([parse/1, to_string/1, to_base_string/2, compare/2]). + +parse(A) -> + gleam__stdlib:parse_int(A). + +to_string(A) -> + erlang:integer_to_binary(A). + +to_base_string(A, B) -> + erlang:integer_to_binary(A, B). + +compare(A, B) -> + case A =:= B of + true -> + eq; + + false -> + case A < B of + true -> + lt; + + false -> + gt + end + end. |