generics on recover
generics on fold and reduce