[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | ben kuin <benkuin@g...> |
| Subject: | Re: [Caml-list] from if...else to pattern matching |
>
> # 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 = <fun>
so I stopped
thanks anyway