Skip to content

Instantly share code, notes, and snippets.

@imknown
Forked from tomaszpolanski/Comparison.txt
Created January 10, 2018 07:48
Show Gist options
  • Save imknown/41bf5731e7190ca5e5d40891ecb53ffb to your computer and use it in GitHub Desktop.
Save imknown/41bf5731e7190ca5e5d40891ecb53ffb 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