Implement curry/uncurry/compose.
Drop unnecessary declared types.