Noun (Anoma v0.29.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 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
Link to this type
noun_atom()
@type noun_atom() :: non_neg_integer() | binary() | []
Link to this type
noun_cell()
@type noun_cell() :: nonempty_improper_list(t(), t())
Functions
Link to this function
abnormalize_noun(atom)
Link to this function
atom_binary_to_integer(binary)
@spec atom_binary_to_integer(noun_atom()) :: non_neg_integer()
Link to this function
atom_binary_to_signed_integer(atom)
I convert the noun atom to a signed integer.
Link to this function
atom_integer_to_binary(integer)
Link to this function
atom_integer_to_binary(integer, length)
@spec atom_integer_to_binary(noun_atom(), non_neg_integer()) :: binary()
Link to this function
axis(axis, noun)
@spec axis(non_neg_integer(), t()) :: {:ok, t()} | :error
Link to this function
condensed_print(atom)
Link to this function
decode_signed(x)
@spec decode_signed(non_neg_integer()) :: integer()
I decode the signed integer from its ZigZag representation.
Link to this function
encode_signed(x)
@spec encode_signed(integer()) :: non_neg_integer()
I convert the signed integer to a noun using the ZigZag encoding.
Link to this function
equal?(noun_1, noun_2)
Link to this function
index_to_offset(n)
@spec index_to_offset(non_neg_integer()) :: non_neg_integer()
Calculates the index from the given access offset
Link to this function
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()]
Link to this function
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
Link to this function
mug(noun)
@spec mug(t()) :: non_neg_integer()
Link to this function
normalize_noun(atom)
Link to this function
pad_trailing(binary, len)
@spec pad_trailing(binary(), non_neg_integer()) :: binary()
Link to this function
replace(axis, replacement, noun)
@spec replace(non_neg_integer(), t(), t()) :: {:ok, t()} | :error
Link to this function
to_normalized_noun(value)
@spec to_normalized_noun(Noun.Nounable.t()) :: t()
Link to this function