Re: [Caml-list] why is the forward pipe operator (>|) so little used?

2010-10-02 Thread Hezekiah M. Carty
On Sat, Oct 2, 2010 at 2:22 PM, ben kuin wrote: > hi > Reading a few introduction F# articles and presentations I made the > observation that the forward pipe operator is widely popular. Its also > a language feature that, when it comes  up on blogposts or on > stackoverflow, its  presented as a s

[Caml-list] why is the forward pipe operator (>|) so little used?

2010-10-02 Thread ben kuin
hi Reading a few introduction F# articles and presentations I made the observation that the forward pipe operator is widely popular. Its also a language feature that, when it comes up on blogposts or on stackoverflow, its presented as a special F# feature. In the Ocaml world the pipe doesn't have

RE: [Caml-list] from if...else to pattern matching

2010-10-02 Thread Jon Harrop
Note that you are using physical equality (==) and not structural equality (=). Also, you can always rewrite: if then true else false more simply as: > -Original Message- > From: caml-list-boun...@yquem.inria.fr [mailto:caml-list- > boun...@yquem.inria.fr] On Behalf Of ben kuin >

Re: [Caml-list] from if...else to pattern matching

2010-10-02 Thread Hezekiah M. Carty
On Sat, Oct 2, 2010 at 10:47 AM, ben kuin wrote: >> >> # let t x = match x with >>  a when x<=4 -> true >>  | _ -> false;; >> > > ok, I had a similar attempt with > >    let tt x = function >    a when x<=4 -> true >    | _ -> false;; > > but that gave me the following (scary  -> 'a -> ) signature

Re: [Caml-list] LablGTK for ocaml 3.12

2010-10-02 Thread Jianzhou Zhao
On Sat, Oct 2, 2010 at 12:39 AM, Jacques Garrigue wrote: > You were looking in the wrong place. > The official lablgtk distribution is at > wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html > > Since 2.14.2 as just been released, and there has been no change in the trunk > since then, the daily

Re: [Caml-list] from if...else to pattern matching

2010-10-02 Thread ben kuin
> > # let t x = match x with > a when x<=4 -> true > | _ -> false;; > ok, I had a similar attempt with let tt x = function a when x<=4 -> true | _ -> false;; but that gave me the following (scary -> 'a -> ) signature val tt : int -> 'a -> bool = so I stopped thanks anyway

Re: [Caml-list] from if...else to pattern matching

2010-10-02 Thread Philip
On Sat, 2010-10-02 at 16:04 +0200, ben kuin wrote: > hi > I try to transform an if-else clause into pattern matching, I think > I've tried a lot of approaches, but apperently I'm doing something > fundemently wrong. > > > ~ > (** Define behaviors against a constang 'x =< c' with if...el

[Caml-list] from if...else to pattern matching

2010-10-02 Thread ben kuin
hi I try to transform an if-else clause into pattern matching, I think I've tried a lot of approaches, but apperently I'm doing something fundemently wrong. ~ (** Define behaviors against a constang 'x =< c' with if...else and pattern matching. I want to see how to match a value against