Current section
Files
Jump to
Current section
Files
src/xo@internal@mark.erl
-module(xo@internal@mark).
-compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]).
-export([swap/1, to_string/1]).
-export_type([mark/0]).
-if(?OTP_RELEASE >= 27).
-define(MODULEDOC(Str), -moduledoc(Str)).
-define(DOC(Str), -doc(Str)).
-else.
-define(MODULEDOC(Str), -compile([])).
-define(DOC(Str), -compile([])).
-endif.
?MODULEDOC(false).
-type mark() :: x | o.
-file("src/xo/internal/mark.gleam", 6).
?DOC(false).
-spec swap(mark()) -> mark().
swap(Mark) ->
case Mark of
x ->
o;
o ->
x
end.
-file("src/xo/internal/mark.gleam", 13).
?DOC(false).
-spec to_string(mark()) -> binary().
to_string(Mark) ->
case Mark of
x ->
<<"x"/utf8>>;
o ->
<<"o"/utf8>>
end.