21 | %hide Data.Vect.fromList
63 | ||| For recursive types we need to extract out the conversion functions
200 | ||| Requires making a choice of traversal order
201 | ||| Is there a good reason to prefer a particular order?
214 | -- old
215 | -- ||| Indexing an element of `xs` and then applying `f` to it is the same as
216 | -- ||| mapping `f` over xs, and then indexing the result
217 | -- public export
218 | -- mapIndexPreserve : {0 f : a -> b} ->
219 | -- (xs : List a) ->
220 | -- (i : Fin (length (f <$> xs))) ->
221 | -- f (index' xs (rewrite sym (lengthMap {f=f} xs) in i))
222 | -- = index' (f <$> xs) i
223 | -- mapIndexPreserve (x :: xs) FZ = Refl
224 | -- mapIndexPreserve (x :: xs) (FS j) = mapIndexPreserve xs j