Skip to content

Instantly share code, notes, and snippets.

@AliAzaz
Forked from tomaszpolanski/Comparison.txt
Created December 30, 2019 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAzaz/e557f624a5fa5f114c6e52569f1f4cc8 to your computer and use it in GitHub Desktop.
Save AliAzaz/e557f624a5fa5f114c6e52569f1f4cc8 to your computer and use it in GitHub Desktop.
Kotlin Standard comparison
╔══════════╦═════════════════╦═══════════════╦═══════════════╗
║ Function ║ Receiver (this) ║ Argument (it) ║ Result ║
╠══════════╬═════════════════╬═══════════════╬═══════════════╣
║ let ║ this@MyClass ║ String("...") ║ Int(42) ║
║ run ║ String("...") ║ N\A ║ Int(42) ║
║ run* ║ this@MyClass ║ N\A ║ Int(42) ║
║ with* ║ String("...") ║ N\A ║ Int(42) ║
║ apply ║ String("...") ║ N\A ║ String("...") ║
║ also ║ this@MyClass ║ String("...") ║ String("...") ║
╚══════════╩═════════════════╩═══════════════╩═══════════════╝
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment