Skip to content

Instantly share code, notes, and snippets.

@mwja
Last active February 22, 2017 08:32
Show Gist options
  • Save mwja/4513f49da8a5ce441ac0f4958d3961a5 to your computer and use it in GitHub Desktop.
Save mwja/4513f49da8a5ce441ac0f4958d3961a5 to your computer and use it in GitHub Desktop.
Tie lang
1 + 2 // 3
// int's class:
class int
  func +(value: int): int
    return CSharpMethods.pl(self, value)

Another idea:

1 + 2 // 3
// int's class:
class int {
  func +: int { | value: int |
    return CSharpMethods.pl(self, value)
  }
}

Another idea:

1 + 2 // 3
// int's class:
int: class {
  +: func = int { | value: int |
    return CSharpMethods.pl(self, value)
  }
}

Another idea:

1 + 2 // 3
// int's class:
int: class {
  +: func = { | value: int |
    return CSharpMethods.pl(self, value)
  }: int
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment