Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ocaml_beginners · Ocaml Beginners

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 13070 - 13099 of 13887   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand Author Sort by Date ^
13070 Jean Saint-Remy
jeansaintremy Send Email
Jan 2, 2012
1:47 am
Hi Everyone, Happy New Year 2012! I have been trying to decipher hash table code of Martin Jambon. The code can be found at...
13071 Dan Bensen
danbensen... Send Email
Jan 2, 2012
3:28 am
... That just means they both take two type arguments (and have the same name). Hashtbl2.t is a new type. ... The right side is a description of the new type. ...
13072 Toby Kelsey
toby.kelsey@... Send Email
Jan 2, 2012
12:15 pm
... This is what it looks like with clearer names and indentation, hopefully you can now see how this works. let add tbl key data = let val_list = try ...
13073 Kim Quyen Ly
lykimq Send Email
Jan 3, 2012
8:41 am
I had these functions computed and ordering an xsd list. val flatten : Xsd.xsd list -> Xsd.xsd list val convert_xsds : Xsd.xsd list -> bool array array val...
13074 Gabriel Scherer
ga_sche Send Email
Jan 3, 2012
9:08 am
I suppose the error is in the name_of_num function, which returns an integer that is not a correct index in the list. If you have trouble knowing where an...
13075 Kim Quyen Ly
lykimq Send Email
Jan 4, 2012
11:10 am
I know that was a problem of function name_of_num because its length is too short compare to the list I returned (list equivalence classes). Here is an example...
13076 Gabriel Scherer
ga_sche Send Email
Jan 4, 2012
12:33 pm
I still don't see the code for "name_of_num". Could you post a self-contained OCaml code (that is, that can be compiled and executed as is) that exhibits your...
13077 Kim Quyen Ly
lykimq Send Email
Jan 4, 2012
1:08 pm
let name_of_num (l: 'a list) (i: int) : 'a = List.nth l i;;...
13078 Dan Bensen
danbensen... Send Email
Jan 4, 2012
1:30 pm
... Quyen, I think Gabriel is asking you to post a complete program. That would be much easier to analyze. ... [Non-text portions of this message have been...
13079 Kim Quyen Ly
lykimq Send Email
Jan 4, 2012
2:11 pm
Thanks!! I was trying to post all the code, but it was a group of files. I try to describe it. Here is a part of xsd trees, from this tree I parse into a list...
13080 Dan Bensen
danbensen... Send Email
Jan 4, 2012
4:41 pm
... So the list of names is ["name";"string&quot;;"label";"nonNegativeInteger"] ... How does "string" depend on "name" or "label"? ... You already have the...
13081 Dan Bensen
danbensen... Send Email
Jan 5, 2012
4:11 am
... Well, I don't know what those numbers in the other posts are supposed to mean, but (m.(i).(j) && m.(j).(i)) seems to be looking for mutually dependent...
13082 Kim Quyen Ly
lykimq Send Email
Jan 6, 2012
4:07 am
Hi, Thank you for your answers!! After that I see my problem was not that. Here is my question. From this list example: let entries = [("symbol";,...
13083 Ashish Agarwal
ashish_a1975 Send Email
Jan 6, 2012
8:56 pm
Can someone please explain both the warning and the function's argument type in the following: # let f ?(x=`a) = match x with `a -> 1 | `b -> 2;; Warning 16:...
13084 Ashish Agarwal
ashish_a1975 Send Email
Jan 6, 2012
9:22 pm
The warning is because I gave only an optional argument to f. The main question is about the type: # let f ?(x=`a) () = match x with `a -> 1 | `b -> 2;; val f...
13085 Philippe Veber
philippeveber Send Email
Jan 6, 2012
9:52 pm
For the warning: it means that there is no way to apply f without providing an 'x' argument. As a consequence x is not a 'real' optional argument, hence the...
13086 Ashish Agarwal
ashish_a1975 Send Email
Jan 6, 2012
10:11 pm
... Firstly, I don't find this part described in the manual. And I don't see why a value applied to f must contain at least `a. The function will work fine if...
13087 Philippe Veber
philippeveber Send Email
Jan 6, 2012
10:20 pm
2012/1/6 Ashish Agarwal <agarwal1975@...> ... I'm mostly describing rules that I infered myself, sorry I can't be more formal :o). ... Sorry that was not...
13088 Ashish Agarwal
ashish_a1975 Send Email
Jan 6, 2012
10:29 pm
Thanks. That is more clear, but I don't see why f b should not type check. It seems it could. I don't see why giving a default value for an argument should...
13089 Jean Saint-Remy
jeansaintremy Send Email
Jan 9, 2012
7:25 am
Hi Mon Ami, Of course lists are immutable, just when I needed to work around this restriction, I made a mistake in my function: let rec insert elt lst = match...
13090 Vu Ngoc San
san.vungoc Send Email
Jan 9, 2012
8:24 am
... AU is the distance between the earth and the sun, and for the other planets, we use fractions of AUs. I started out with [ 1325221860.; 1325243520.;...
13091 Philippe Veber
philippeveber Send Email
Jan 9, 2012
8:30 am
Hi Jean 2012/1/9 Jean Saint-Remy <jeansaintremy@...> ... lst is used in the pattern matching (when you say 'match lst with ...'), that is why you don't...
13092 rixed@...
rixed Send Email
Jan 9, 2012
9:04 am
-[ Sun, Jan 08, 2012 at 11:25:13PM -0800, Jean Saint-Remy ]---- ... let rec insert elt lst = match lst with ... else head :: insert elt tail ;; There is no...
13093 Philippe Veber
philippeveber Send Email
Jan 9, 2012
2:17 pm
In your example it wouldn't hurt, but consider this (admitedly stupid) one: # let f ?(x : 'a = `a) (g : 'a -> int) = match x with `a -> g x | `b -> g x;; val f...
13094 Jean Saint-Remy
jeansaintremy Send Email
Jan 9, 2012
3:45 pm
Hi, So sorry, I did not make myself clear. I made a mistake in my function, instead of consing new element with the previous list, I was passing the variable...
13095 Thomas Gazagnaire
tgazagna Send Email
Jan 9, 2012
4:03 pm
You email is still not very clear, but I guess you want to have: let rec map2 f1 f2 = function ... so you can run: # map2 (fun x y -> (y -. x) /. 4) l or for...
13096 Ashish Agarwal
ashish_a1975 Send Email
Jan 9, 2012
4:06 pm
I see the example you're after, but in this case x : [< `a | `b ] would still be sufficient because you can't get to the `b branch with the default value `a. I...
13097 Jean Saint-Remy
jeansaintremy Send Email
Jan 9, 2012
5:02 pm
Hi, My apologies for making my code look like Lisp. I used too many words before. let fa = [| 1325221860.; 1325243520.; 1325265720.; 1325288280.; |]  ;; for...
13098 Toby Kelsey
toby.kelsey@... Send Email
Jan 9, 2012
6:14 pm
... So basically you want to interpolate some values in a list. You could add mid-points with something like this: let rec add_mid lst = match lst with ... ...
13099 Jean Saint-Remy
jeansaintremy Send Email
Jan 11, 2012
12:05 am
Hi, Thanks a million. That's a very interesting idea of having a variable declared with keyword "as" inside a rec function. There is however a very very small...
Messages 13070 - 13099 of 13887   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help