ListToCsv.Option (list_to_csv v1.0.0) View Source

ListToCsv.Option contains types and utilities for option.

Link to this section Summary

Link to this section Types

Specs

t() :: [
  headers: [ListToCsv.Header.t()] | nil,
  keys: [ListToCsv.Key.many()],
  length: [{ListToCsv.Key.many(), integer()}] | nil
]

Link to this section Functions

Specs

chunks(list(), function()) :: {list(), list(), list()}

split list 3 part with respect orders

  • 1st not matched with fun
  • 2nd matched with fun
  • 3rd not matched with fun

Examples

iex> chunks([1, 2, 3, 2, 1, 3, 2], &(&1 == 3))
{[1, 2], [3], [2, 1, 3, 2]}

Specs

Specs

Link to this function

starts_with?(keys, prefix)

View Source