∀ {α : Type u_1} {β : Type u_2} {σ : Type u_4} [inst : Primcodable α] [inst_1 : Primcodable β] [inst_2 : Primcodable σ]
  {f : α → List β} {g : α → σ} {h : α → β × σ → σ},
  Primrec f → Primrec g → Primrec₂ h → Primrec fun a => List.foldr (fun b s => h a (b, s)) (g a) (f a)