Skip to content

Instantly share code, notes, and snippets.

@fermartz
Last active January 16, 2023 18:20
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 fermartz/57e10b66412c5aff05d019cc76ab9902 to your computer and use it in GitHub Desktop.
Save fermartz/57e10b66412c5aff05d019cc76ab9902 to your computer and use it in GitHub Desktop.
Motoko Counter
actor {
var count : Int = 0;
public func increment() : async () {
count += 1;
};
public query func get_value() : async Int {
count;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment