Skip to content

Instantly share code, notes, and snippets.

@fermartz
Created January 16, 2023 20:56
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/2e92a85988ebcf297e01c94c5d02afd8 to your computer and use it in GitHub Desktop.
Save fermartz/2e92a85988ebcf297e01c94c5d02afd8 to your computer and use it in GitHub Desktop.
import Int "mo:base/Int";
actor {
// *************************
// *** MIN MAX FUNCTIONS ***
// *************************
public func get_min_value(x : Int, y : Int) : async Int {
let min = Int.min(x, y);
min;
};
public func get_max_value(x : Int, y : Int) : async Int {
let max = Int.max(x, y);
max;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment