ObserverWeb.Apps.Helper (Observer Web v0.0.3)

Helper functions and JSON encoders.

References:

Summary

Functions

Formats function information as readable string.

Parallel map implemented with Task.

Functions

format_function(name)

@spec format_function(nil | {atom(), atom(), integer()} | atom()) :: String.t() | nil

Formats function information as readable string.

Only name will be return if only name is given.

Example:

iex> format_function {Logger, :log, 2}
"Logger.log/2"
iex> format_function :format_function
"format_function"
iex> format_function nil
nil

parallel_map(enum, function)

@spec parallel_map(enum :: list(), function :: (... -> any())) :: list()

Parallel map implemented with Task.

Maps the function over the enum using Task.async/1 and Task.await/1.