The Smolyak Algorithm and Tensor Products of Function Spaces