
/// 【函数摘要】求和
///
/// 【函数描述&包含示例代码】将传入的两个Int类型整数相加,返回和:
///
/// let result = sum(a: 1, b: 1)
/// print(result) // 2
///
/// - returns:【返回值】两个整数的和
///
/// - Note:【注释】传入的两个参数类型必须是Int类型
///
/// - Parameters:
/// - a: 【参数值】第一个参数
/// - b: 【参数值】第二个参数
func sum(a: Int, b: Int) -> Int {
a + b
}
网友评论