On 24 September 2010 01:15, Elias Gabriel Amaral da Silva
wrote:
> [1] Pervasives should define it. In fact, even though ** is
> right-associative, it looks like any user-defined operator is
> left-associative by default. So it works like Haskell:
>
> # let ($) a b = a b;;
> val ( $ ) : ('a -> 'b)
Note that you can directly observe boxedness using the Obj functions:
# type t1 = { a : float; b : int };;
type t1 = { a : float; b : int; }
# type t2 = { c : float; d : float };;
type t2 = { c : float; d : float; }
# let x1 = { a = 1.; b = 2 };;
val x1 : t1 = {a = 1.; b = 2}
# let x2 = { c = 3.;
On 10 August 2010 08:34, Jim Pryor wrote:
> Fermat's Little Theorem says that when p is prime, then for all 1<=a a**(p-1) mod p = 1. However, some composite p also have this property
> for some choices of a. However, if one checks a handful of a, only a few
> composite p will have the property wrt
On 8 August 2010 17:47, bluestorm wrote:
> If you don't have any of these, you have to declare infix operators
> directly inside the module. You'd have a "val (=) : int -> int ->
> bool" in the "int.ml" file for example. That's notoriously painful to
> handle if you use the "open" statement : a bu