Re-implement cat.