a sample code for demonstrate generic code in Swift