View Source ExAequoBase.Io (ExAequoBase v0.1.0)

Transform input from files, stdin, or binaries

Summary

Types

@type atoms() :: [atom()]
@type binaries() :: [binary()]
@type either(lt, rt) :: {:ok, lt} | {:error, rt}
@type input_source_t() :: Enumerable.t() | binary() | binaries()
@type maybe(t) :: nil | t
@type natural() :: non_neg_integer()
@type numbered(t) :: {t, natural()}
@type numbered_line_t() :: numbered(binary())
@type numbered_lines_t() :: [numbered_line_t()]
@type result_t(t) :: either(t, binary())
@type stream_t() ::
  %IO.Stream{device: term(), line_or_bytes: term(), raw: term()}
  | %File.Stream{
      line_or_bytes: term(),
      modes: term(),
      node: term(),
      path: term(),
      raw: term()
    }

Functions

Link to this function

numbered_lines(input, initial_lnb \\ 1)

View Source
@spec numbered_lines(input_source_t(), natural()) :: numbered_lines_t()
Link to this function

numbered_lines_stream(input_source, initial_lnb \\ 1)

View Source
@spec numbered_lines_stream(input_source_t(), natural()) :: Enumerable.t()