Implementing `join`.