Skip to content

Instantly share code, notes, and snippets.

@LiewJunTung
Created January 28, 2018 16:15
Show Gist options
  • Save LiewJunTung/4cff73ff983d0f93dd2b348c34647413 to your computer and use it in GitHub Desktop.
Save LiewJunTung/4cff73ff983d0f93dd2b348c34647413 to your computer and use it in GitHub Desktop.
Added a subtraction method
calculator =
interface +c {
# create() is to create an instance of the calculator
static create(): calculator;
# summation, adding two i32.. aka integers together. And return an integer.
summation(number1: i32, number2: i32):i32;
# look at me, a subtraction method! :)
subtraction(number1: i32, number2: i32):i32;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment