Search the web
Sign In
New User? Sign Up
ocaml_beginners · Ocaml Beginners
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Messages 4890 - 4919 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
4890
Hi, I'm writing a couple of modules implementing a binary tree. Im proceeding adding a functions one by one becouse of checking with ocaml interpreter. Here...
Java
segolas1212
Offline Send Email
Nov 1, 2005
12:03 pm
4891
On Tue, 01 Nov 2005 12:59:21 +0100 ... that's rigth not right, so ocaml is right :-) Michael...
micha
scheischeischei
Offline Send Email
Nov 1, 2005
12:29 pm
4892
... ARGH! I lost lots of time checking errors like theese, anyone knows if is there a possibility to let ocaml interpreter highlight the error line? It only...
Java
segolas1212
Offline Send Email
Nov 1, 2005
1:50 pm
4893
... It should underline the error by default. Are you using Windows or something? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for...
Jon Harrop
harropjon
Offline Send Email
Nov 1, 2005
2:17 pm
4894
On Tue, Nov 01, 2005 at 12:59:21PM +0100, Java wrote: [...] Someone else has found the obvious error; I have a few other ... You're using tuples as parameters,...
Richard Jones
rwmjones
Offline Send Email
Nov 1, 2005
2:20 pm
4895
... Well, it does. (********************************************************) Objective Caml version 3.09.0 # type 'a tree = ... let rec search (x, tree) = ...
William D. Neumann
scoey13
Offline Send Email
Nov 1, 2005
2:43 pm
4896
I'm getting crazy {O.o} first of all a very beginner question: writing "let rec search x tree" is the same as "let rec search (x,tree)"???? (if not pleas...
Java
segolas1212
Offline Send Email
Nov 1, 2005
3:16 pm
4897
I want to implement an operator "comp" which shall deliver the composition of two functions. I said let comp : ('b -> 'c) -> ('a -> 'b) -> ('a -> 'c) = fun f g...
Holger Schulz
schulz_mathe
Offline Send Email
Nov 1, 2005
3:27 pm
4898
... No, it is not. (x, tree) is a tuple, which is a single type/entity/whatever word you want to use. parenthesis and commas are not used in OCaml to...
Jonathan Bryant
jonboy3182
Offline Send Email
Nov 1, 2005
3:30 pm
4899
... No they're not the same. let rec search x tree = (* definition *) defines a recursive function called search which takes two parameters. Whereas: let rec...
Richard Jones
rwmjones
Offline Send Email
Nov 1, 2005
4:04 pm
4900
... Ok, thanks for the link...
Java
segolas1212
Offline Send Email
Nov 1, 2005
4:09 pm
4901
... I think this is just because -> is right-associative. The toplevel is just omitting parentheses where it can. Rich. -- Richard Jones, CTO Merjis Ltd. ...
Richard Jones
rwmjones
Offline Send Email
Nov 1, 2005
4:14 pm
4902
... Ok, but I need to use tuples becouse I'm defining data types for a didattical language. Or probably my teacher knows ML syntax and say us touse Ocaml...
Java
segolas1212
Offline Send Email
Nov 1, 2005
4:20 pm
4903
... I think he was referring to OCaml's renaming of his polymorphic parameters. E.g. # type 'blah_blah tree = E ... type 'a tree = E | N of 'a tree * 'a * 'a...
William D. Neumann
scoey13
Offline Send Email
Nov 1, 2005
4:22 pm
4904
Hi, I need to build a tree datatype defined like this: "type 'a tree = Empty | Node of 'a * 'a tree * 'a tree" How can I print all the leafs in this way? I...
Java
segolas1212
Offline Send Email
Nov 1, 2005
5:51 pm
4905
On Tue, 01 Nov 2005 18:51:13 +0100 ... for example: let rec frontiera tree = match tree with ... you can change the placement of the print to change how the...
micha
scheischeischei
Offline Send Email
Nov 1, 2005
6:22 pm
4906
... Well, there are a couple of problems here. The one you are having now, I'm guessing, is due to your not handling cases like Node (y,Empty,right) ...
William D. Neumann
scoey13
Offline Send Email
Nov 1, 2005
6:42 pm
4907
... RIGHT!!! thanks a lot Segolas...
Java
segolas1212
Offline Send Email
Nov 1, 2005
7:03 pm
4908
... You've already figured out the problem, now I want to solve the problem you were trying to solve- which is probably that you wanted to raise the exception...
Brian Hurt
bhurt42
Offline Send Email
Nov 1, 2005
7:49 pm
4909
... I'd call that a disadvantage of O'Caml. Thanks. hs...
Holger Schulz
schulz_mathe
Offline Send Email
Nov 2, 2005
3:59 pm
4910
... I don't think anyone has mentioned the problem that your leaves (nodes with no children) are all Empty, so there isn't a whole lot to print. ;-) -- Dr Jon...
Jon Harrop
harropjon
Offline Send Email
Nov 2, 2005
4:06 pm
4911
Also I think you are missing two cases ... --Vamsi ... frontiera(right) ... (nodes with no...
vamsika2004
Offline Send Email
Nov 2, 2005
4:28 pm
4912
We have to build a binary tree data structure for out software. And on the tree we distinguish nodes into either ordinary nodes or handles. type node = Leaf of...
vamsika2004
Offline Send Email
Nov 2, 2005
4:38 pm
4913
... It is isomorphic to what you ordered. OCaml is NOT ignoring your type suggestions, it is simply using different names. This is a subtle distinction, but an...
Seth J. Fogarty
aravthamis
Offline Send Email
Nov 2, 2005
7:40 pm
4914
... If this is the biggest disadvantage Ocaml has, count your blessings. Brian...
Brian Hurt
bhurt42
Offline Send Email
Nov 2, 2005
11:12 pm
4915
... The type that you specify is plugged into the unifier and the result of unification is not necessarily the same. For example: # let f : 'a -> 'b = fun x ->...
Jon Harrop
harropjon
Offline Send Email
Nov 3, 2005
12:05 am
4916
Hi, While looking at my imperative style code for the set-union algorithm to make it functional I realized that I could speed it up because I was setting ...
Hugo Ferreira
hugotwo3
Offline Send Email
Nov 3, 2005
10:41 am
4917
... No, "let s_b = v in sequel" creates a new variable named s_b that shadows the variable defined and bound by the match. That new s_b variable is indeed...
Frederic van der Plan...
fplancke2001
Offline Send Email
Nov 3, 2005
10:53 am
4918
Hi Frédéric, ... You are so correct. Obviously I should have seen this. ... Not what I am looking for. In the above we are just setting s_b's value to v's ...
Hugo Ferreira
hugotwo3
Offline Send Email
Nov 3, 2005
11:34 am
4919
... Well, that's not what you're doing. What "let _ = s_v = ref b in blah" does is check to see if s_v is equal to ref b (i.e. if it is a reference that...
William D. Neumann
scoey13
Offline Send Email
Nov 3, 2005
3:15 pm
Messages 4890 - 4919 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

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