5

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!

Alvin John
  • 385
  • 2
  • 12

2 Answers2

7

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

Antzi
  • 12,325
  • 6
  • 44
  • 72
Eric Aya
  • 69,000
  • 34
  • 174
  • 243
0

The Developer used ObjectMapper. https://github.com/Hearst-DD/ObjectMapper

That's why. Thank you guys for answering my post here.

Cheers!

Alvin John
  • 385
  • 2
  • 12