@[inline_if_reduce]
Auxiliary definition for List.toArray
.
List.toArrayAux as r = r ++ as.toArray
Instances For
@[match_pattern, inline, export lean_list_to_array]
Convert a List α
into an Array α
. This is O(n) in the length of the list.
Equations
- List.toArrayImpl as = as.toArrayAux (Array.mkEmpty as.length)