RosettaCodeData/Task/Variadic-function/Coq/variadic-function-3.coq

6 lines
194 B
Text
Raw Permalink Normal View History

2015-11-18 06:14:39 +00:00
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.