🔸argument label

Swiftbasic typesfunction ⟩ argument label

// • AL: (argument label) for outer call sites. ⭐️
// • PN: (parameter name) for inner implementation.
//
//         ╭─AL─╮ ╭PN╮          ╭AL╮ ╭──PN──╮
func greet(person name: String, from hometown: String)

when you assign a function to a variable, you can't use argument labels on calling the function through that variable. 👉 see: function as variable

Last updated