Inspect.Algebra.group

You're seeing just the function group, go back to Inspect.Algebra module for more information.
Link to this function

group(doc, mode \\ :self)

View Source

Specs

group(t(), :self | :inherit) :: doc_group()

Returns a group containing the specified document doc.

Documents in a group are attempted to be rendered together to the best of the renderer ability.

The group mode can also be set to :inherit, which means it automatically breaks if the parent group has broken too.

Examples

iex> doc =
...>   Inspect.Algebra.group(
...>     Inspect.Algebra.concat(
...>       Inspect.Algebra.group(
...>         Inspect.Algebra.concat(
...>           "Hello,",
...>           Inspect.Algebra.concat(
...>             Inspect.Algebra.break(),
...>             "A"
...>           )
...>         )
...>       ),
...>       Inspect.Algebra.concat(
...>         Inspect.Algebra.break(),
...>         "B"
...>       )
...>     )
...>   )
iex> Inspect.Algebra.format(doc, 80)
["Hello,", " ", "A", " ", "B"]
iex> Inspect.Algebra.format(doc, 6)
["Hello,", "\n", "A", "\n", "B"]