View Source CliexMap.Builtins (CliexMap v0.2.0)

Built in functions which can be called in pattern modfifers (reverse)(downcase)

Summary

Types

@type ast() :: any()
@type binaries() :: [binary()]
@type binary?() :: maybe(binary())
@type color_list() :: [binary() | atom()]
Link to this type

either(success_t, error_t)

View Source
@type either(success_t, error_t) :: {:ok, success_t} | {:error, error_t}
@type line_nb_t() :: non_neg_integer()
@type maybe(t) :: nil | t
@type name_value_pair_t() :: {binary(), any()}
@type numbered_line_t() :: {line_nb_t(), binary()}

Functions

@spec abs(CliexMap.Context.t(), [integer()]) :: integer()
@spec at(CliexMap.Context.t(), list()) :: any()
@spec downcase(CliexMap.Context.t(), list()) :: binary()
@spec join(CliexMap.Context.t(), list()) :: binary()
Link to this function

map_either(either_value, mapper)

View Source
@spec map_either(either(success_t, error_t), (success_t -> transformed_t)) ::
  either(transformed_t, error_t)
when success_t: any(), error_t: any(), transformed_t: any()
@spec reverse(CliexMap.Context.t(), list()) :: binary()
@spec revlist(CliexMap.Context.t(), list()) :: list()
@spec segment(CliexMap.Context.t(), list()) :: binary()
@spec segments(CliexMap.Context.t(), list()) :: binary()
@spec slice(CliexMap.Context.t(), list()) :: list()
Link to this function

splice_join(context, args)

View Source
@spec splice_join(CliexMap.Context.t(), list()) :: binary()
@spec splicej(CliexMap.Context.t(), list()) :: binary()

See CliexMap.Builtins.splice_join/2.

@spec split(CliexMap.Context.t(), list()) :: list()
@spec sub(maybe(CliexMap.Context.t()), list()) :: binary()
@spec upcase(CliexMap.Context.t(), list()) :: binary()