Given two lists of potentially different lengths, right-pads the shorter list with unit
elements until they are the same length.
Equations
- l₁.matchSize l₂ unit = (List.rightpad l₂.length unit l₁, List.rightpad l₁.length unit l₂)
Instances For
List.matchSize returns two equal lists iff the two lists agree at every index i : Nat
(extended by unit if necessary).
List.dropWhile but starting from the last element. Performed by dropWhile on the reversed
list, followed by a reversal.
Equations
- List.dropLastWhile p l = (List.dropWhile p l.reverse).reverse