Unit Testing, Property Testing, Elixir Language, Elixirlang, Refactoring.
(1..100) |> Enum.random() [0, 10, 13, 111, 1013] |> Enum.each(fn length -> l = random_list(length) actual = Morphix.partiphify!(l, k) {min, max} = actual |> Enum.map(fn l -> Enum.count(l) end) |> Enum.min_max() assert abs(max - min) <= 1 end) end Are we ready to refactor yet? Finally, yes. A key