add type signature to foldtree