Alvin John Alvin John - 2 months ago 8
Swift Question

Meaning of "<-" in Swift

I am reviewing a code from other developers and I saw some unfamiliar codes. One of the unfamiliar code is this.

identifier <- map["id"]

identifier is a variable inside the struct. Can you please help me what is the use of "<-" symbol? I tried googling it but I can't find the right answer. Thank you!


The <- operator is not part of Swift.

There's nothing in the Swift manual about it.

It is a custom operator defined by a third-party library you're using in your project.

If you do a CMD-click on it, Xcode should open the operator's declaration