0

I am learning Swift by myself on MacOS. When following the tutorial and practicing the array function: <array_name>.sort(), I can get it executed but I always wonder how it works and what is the actual algorithm inside it. So is there any way to check the certain function definitions?

Alex
  • 3,689
  • 1
  • 21
  • 32
fryingPan
  • 13
  • 4

1 Answers1

1

If you want to check the declaration of the function/class, you can command-click on it. If you want the documentation, you can either option-click it or check it on the API reference page. If you want to see the implementation details of the Swift standard library, check the source code here at GitHub. If the implementation you are checking is in a non open-source APIs though, you can't quite check it.

jlehr
  • 15,557
  • 5
  • 43
  • 45
Papershine
  • 4,995
  • 2
  • 24
  • 48