You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the Int structure from the standard basis library. Per Moscow ML it has the following interface:
val precision : int option
val minInt : int option
val maxInt : int option
val ~ : int -> int (* Overflow *)
val * : int * int -> int (* Overflow *)
val div : int * int -> int (* Div, Overflow *)
val mod : int * int -> int (* Div *)
val quot : int * int -> int (* Div, Overflow *)
val rem : int * int -> int (* Div *)
val + : int * int -> int (* Overflow *)
val - : int * int -> int (* Overflow *)
val > : int * int -> bool
val >= : int * int -> bool
val < : int * int -> bool
val <= : int * int -> bool
val abs : int -> int (* Overflow *)
val min : int * int -> int
val max : int * int -> int
val sign : int -> int
val sameSign : int * int -> bool
val compare : int * int -> order
val toInt : int -> int
val fromInt : int -> int
val toLarge : int -> int
val fromLarge : int -> int
val scan : StringCvt.radix
-> (char, 'a) StringCvt.reader -> (int, 'a) StringCvt.reader
val fmt : StringCvt.radix -> int -> string
val toString : int -> string
val fromString : string -> int option (* Overflow *)
Example use:
Int.compare;
> val it = fn : int * int -> order
Int.compare (2, 3);
> val it = LESS : order
Int.maxInt;
> val it = SOME 1073741823 : int option
Implement the `Int` structure from the standard basis
library. (The `Int` structure is an instance of the `INTEGER`
signature in the Standard Basis Library but Morel does not
currently have signatures.)
Fixes#228
Implement the
Int
structure from the standard basis library. Per Moscow ML it has the following interface:Example use:
The
Int
structure is an instance of theINTEGER
signature in the Standard Basis Library but Morel does not currently have signatures.The text was updated successfully, but these errors were encountered: