Often one wants to have a comparison function that focuses onto a specific part of a data structure, e.g. order = fn a, b -> a.idx < b.idx end from the test.
There should be a dedicated function to this, @spec get_interval_on(t(data1), (data1 -> data2)), similar to https://hexdocs.pm/elixir/Enum.html#sort_by/3.
Often one wants to have a comparison function that focuses onto a specific part of a data structure, e.g.
order = fn a, b -> a.idx < b.idx endfrom the test.There should be a dedicated function to this,
@spec get_interval_on(t(data1), (data1 -> data2)), similar to https://hexdocs.pm/elixir/Enum.html#sort_by/3.