| 1 |
From Coq Require Import List. |
| 2 |
Require Export Crypto.Util.FixCoqMistakes. |
| 3 |
Import ListNotations. |
| 4 |
Local Open Scope list_scope. |
| 5 |
|
| 6 |
Module List. |
| 7 |
Definition combine_extend {A} {B} |
| 8 |
:= fix combine_extend (defaultA : A) (defaultB : B) (l : list A) (l' : list B) {struct l} : list (A * B) |
| 9 |
:= match l, l' with |
| 10 |
| [], [] => [] |
| 11 |
| [], _ => List.map (fun y => (defaultA, y)) l' |
| 12 |
| _, [] => List.map (fun x => (x, defaultB)) l |
| 13 |
| x :: tl, y :: tl' => (x, y) :: combine_extend x y tl tl' |
| 14 |
end. |
| 15 |
End List. |