Noun (Anoma v0.30.0)
The noun data structure.
Represented as Elixir cons cells, which might get annoying.
Summary
Functions
I convert the noun atom to a signed integer.
I convert an Elixir boolean to a Nock one.
I decode the signed integer from its ZigZag representation.
I convert the signed integer to a noun using the ZigZag encoding.
Calculates the index from the given access offset
I try to turn an Elixir term to a proper list. If the term is a nock list, return {:ok, result} Otheriwse :error
Types
noun_atom()
@type noun_atom() :: non_neg_integer() | binary() | []
noun_cell()
@type noun_cell() :: nonempty_improper_list(t(), t())
Functions
abnormalize_noun(atom)
atom_binary_to_integer(binary)
@spec atom_binary_to_integer(noun_atom()) :: non_neg_integer()
atom_binary_to_signed_integer(atom)
I convert the noun atom to a signed integer.
atom_integer_to_binary(integer)
atom_integer_to_binary(integer, length)
@spec atom_integer_to_binary(noun_atom(), non_neg_integer()) :: binary()
axis(axis, noun)
@spec axis(non_neg_integer(), t()) :: {:ok, t()} | :error
bool_to_noun(bool)
@spec bool_to_noun(bool()) :: 1 | 0
I convert an Elixir boolean to a Nock one.
condensed_print(atom)
decode_signed(x)
@spec decode_signed(non_neg_integer()) :: integer()
I decode the signed integer from its ZigZag representation.
encode_signed(x)
@spec encode_signed(integer()) :: non_neg_integer()
I convert the signed integer to a noun using the ZigZag encoding.
equal?(noun_1, noun_2)
index_to_offset(n)
@spec index_to_offset(non_neg_integer()) :: non_neg_integer()
Calculates the index from the given access offset
list_nock_to_erlang(arg1)
@spec list_nock_to_erlang(0) :: []
@spec list_nock_to_erlang(<<_::0>>) :: []
@spec list_nock_to_erlang([]) :: []
@spec list_nock_to_erlang(nonempty_improper_list(t(), t())) :: [t()]
list_nock_to_erlang_safe(x)
I try to turn an Elixir term to a proper list. If the term is a nock list, return {:ok, result} Otheriwse :error
mug(atom)
@spec mug(t()) :: non_neg_integer()
mum(seed, fal, key)
mum_rec(i, seed, fal, key)
normalize_noun(atom)
pad_trailing(binary, len)
@spec pad_trailing(binary(), non_neg_integer()) :: binary()
replace(axis, replacement, noun)
@spec replace(non_neg_integer(), t(), t()) :: {:ok, t()} | :error
to_normalized_noun(value)
@spec to_normalized_noun(Noun.Nounable.t()) :: t()