Fold with type hint