I noticed that the signature for Vec.filter
is
filter : ∀ {n} → Vec A n → Vec≤ A n
In order to go back to a Vec
can I only use
padRight : ∀ {n} → A → Vec≤ A n → Vec A n
or
padLeft : ∀ {n} → A → Vec≤ A n → Vec A n
?
Ideally I would like to get back a Vec
that has its length equal to the initial length of the Vec
minus the number of elements that have been filtered out (instead of padding the spots where the elements have been filtered out).
Thanks!