IceCream (Ice Cream v0.0.2) View Source

Link to this section Summary

Functions

Prints the calling filename, line number, and parent module/function.

Prints the term with itself as a label. Returns the evaluated term.

Link to this section Functions

Specs

ic() :: Macro.t()

Prints the calling filename, line number, and parent module/function.

Link to this macro

ic(term, opts \\ [])

View Source (macro)

Specs

ic(term(), Keyword.t()) :: Macro.t()

Prints the term with itself as a label. Returns the evaluated term.

Accepts the same opts as the Inspect protocol. (see: Inspect.Opts)

Examples

Variables

foo = "abc"
ic(foo)

Prints

ic| foo: "abc"

Module Function Argument calls

ic(:math.pow(2,3))

Prints

ic| :math.pow(2,3): 8.0

It also works with pipes

2
|> :math.pow(3)
|> ic()

also prints ic| :math.pow(2,3): 8.0