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
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
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
>
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
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
>
> # 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
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
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