 //: ![](my-filter-function.png)
 //: ![](get-odd-filter-function.png)
 
-func myFilterFunction<T>(items: T..., sorter: (T) -> Bool) -> [T] {
+func myFilterFunction<T>(items: T...,
+    sorter: (T) -> Bool) -> [T] {
     var result = [T]()
     for item in items {
         if sorter(item) {


//:
//: By default, the first parameter omits its external name, and the second and subsequent parameters use their local 
//: name as their external name. So to call this `add` function, you have to call it like:
//:

add(1, b: 2)  // `b` is the external name of the second argument, which is also the same as its local name.

//: You write an external parameter name before the local parameter name it supports, separated by a space.
//:
//: ![](greeting-func.png)

func greeting(greetingMessage: String, person personName: String) -> String {
    return "Hi, \(personName). \(greetingMessage)"
}
greeting("Nice to meet you", person: "Peter")

func sendGift(to personName: String, gift giftName: String) -> String {
    return "Hi, \(personName). You have got \(giftName) as a gift."
}
sendGift(to: "Samantha", gift: "A Swift programming tutorial")

    for number in numbers {
        total += number
    }
    return total / Double(numbers.count)
}
average(1, 2, 3, 4, 5)

//: ### Arguments with Generic Types

