I want to retrieve the list max_sell_order from the function below in MyApp.WorkA
def handle_info(:sell_order_fetch, state) do
data = sell_order()
|> Enum.sort_by(&(Map.get(&1, "price")), &>=/2)
|> get_sell_head
max_sell_order = data
schedule_sell_order_fetch
{:noreply, Map.put(state, :max_sell_order, max_sell_order)}
end
and use it in another function in another module for some calculations. example
require MyApp.FunctionA
def new_function(max_sell_order) do: IO.inspect(max_sell_order)
But I keep getting undefined function max_sell_order.
Please, how can I call and use the list from another module inside another module?