AB
[:phoenix, :router_dispatch, :start]
приходит больше меты с ивентом, чем в [:phoenix, :endpoint, :stop]
Size: a a a
AB
[:phoenix, :router_dispatch, :start]
приходит больше меты с ивентом, чем в [:phoenix, :endpoint, :stop]
LL
[:phoenix, :router_dispatch, :start]
приходит больше меты с ивентом, чем в [:phoenix, :endpoint, :stop]
AB
AB
AB
log
из get "/books", Controllers.ApiV0, :book_list, log: false
не попадает в [:phoenix, :endpoint, :stop]
AB
AB
[:phoenix, :endpoint, :stop]
от [:phoenix, :router_dispatch, :stop]
? что между ними происходит вообще?BB
BB
BB
BB
BB
BB
BB
AB
AV
selector = fn f ->
fn _, data, next ->
data |> Enum.filter(f) |> Enum.map(next)
end
end
data = %{items: [%{id: 2, count: 2}, %{id: 1, count: 3}, %{id: 2, count: 4}]}
get_in(data, [:items, selector.(&(1 == &1[:id])), :count])
find_first = fn clause ->
fn _, list, next ->
index = Enum.find_index(list, clause)
get_and_update_in(list, [Access.at(index)], next)
end
end
data = %{items: [%{id: 2, count: 2}, %{id: 1, count: 3}, %{id: 2, count: 4}]}
update_in(data, [:items, find_first.(&(2 == &1[:id])), :count], &(&1+1))
AD
MK
AD