RosettaCodeData/Task/Variadic-function/Rocq/variadic-function-3.rocq
2026-04-30 12:34:36 -04:00

5 lines
194 B
Text

Require Import List.
Fixpoint build_list_aux {A: Set} (acc: list A) (n : nat): Arity A (list A) n := match n with
|O => acc
|S n' => fun (val: A) => build_list_aux (acc ++ (val :: nil)) n'
end.