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 2805 - 2834 of 13890   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand Author Sort by Date ^
2805 zakaluka Send Email Dec 4, 2004
2:28 am
Dmitry, Thanks a lot for the patch. I was finally able to test it and it fixes my problem. I have been able to successfully compile and install Ocaml 3.08.2...
2806 andrew cooke
andrew@... Send Email
Dec 6, 2004
1:00 pm
Hi, I've been using Ocaml for some time now, but have not tried profiling before (iirc). When I run my program after compiling with "ocamlopt -p" I get a...
2807 andrew cooke
andrew@... Send Email
Dec 6, 2004
1:50 pm
Ah. I need to run the program for longer to get more sample hits. The sampling is apparently finer on Linux, for some reason. Andrew ... -- ` __ _ __ ___...
2808 Joe Polanik
jpolanik Send Email
Dec 8, 2004
8:34 pm
I've just started working with ocaml, trying out various functions. The following code let data = [1,2,3,4,5,6];; let s = (List.fold_left (+) data) in...
2809 Simão Melo de Sousa
spinningtower Send Email
Dec 8, 2004
8:45 pm
In fact let data = [1,2,3,4,5,6];; defines a list containing only one element: the 6-tuple (1,2,3,4,5,6). I think you mean let data = [1;2;3;4;5;6];; -- ...
2810 Karl Zilles
kzilles Send Email
Dec 8, 2004
8:45 pm
... A list constant is delimited with ';'. What you have there is a list with one element which is six-tuple. What you want is: let data = [1;2;3;4;5;6];; ......
2811 Matt Gushee
mcgushee Send Email
Dec 8, 2004
8:56 pm
... Welcome to the tribe! ... Okay, there are two problems with your code. First, your list syntax: list element are separated with semicolons, not commas. So...
2812 Frédéric Gava
frederic.gava@... Send Email
Dec 8, 2004
9:32 pm
Hi, let data=[1;2;3;4;5;6] !!!!! "," is for nuple (1,2,3,4,5) is a 5-uple of type int * int * int * int * int [1;2;3;4;5] is a list of type int list Cheers ...
2813 Karl Zilles
kzilles Send Email
Dec 9, 2004
1:01 am
... Not true. first::rest will not match the empty string, and the empty string will not match any non-empty string, so you can put the patterns in either...
2814 Matt Gushee
mcgushee Send Email
Dec 9, 2004
1:22 am
... Oops! You're right, of course. I must have been thinking of something a little different. -- Matt Gushee Englewood, CO, USA...
2815 Henrique
henriecosta Send Email
Dec 9, 2004
12:10 pm
_____ From: Karl Zilles [mailto:zilles@...] Sent: quarta-feira, 8 de Dezembro de 2004 20:44 To: ocaml_beginners@yahoogroups.com Subject: Re:...
2816 Virgile Prevosto
virgilepr Send Email
Dec 9, 2004
12:46 pm
... Hello, ocaml sees '(*' as the beginning of a comment, and it just waits for you to close it by '*)'. Use '( * )' instead, so that no confusion will be...
2817 Heiko.Kuhrt@...
heikuh Send Email
Dec 9, 2004
12:54 pm
... ^^^^^ (*) starts a comment try ( * ) I got a warning "This is a start of a comment." And now it says "*) : this is not the end of a comment." Heiko...
2818 Henrique
henriecosta Send Email
Dec 9, 2004
2:32 pm
_____ From: Heiko.Kuhrt@... [mailto:Heiko.Kuhrt@...] Sent: quinta-feira, 9 de Dezembro de 2004 12:58 To: ocaml_beginners@yahoogroups.com ...
2819 Joe Polanik
jpolanik Send Email
Dec 9, 2004
4:24 pm
Evidently, I don't get exponentiation and/or the map function. After: open List;; let listIn = [1;2;3;4];; let listFloat = (map ( float ) listIn);; The...
2820 Virgile Prevosto
virgilepr Send Email
Dec 9, 2004
4:56 pm
... ( **2. ) is not a valid ocaml expression. In fact, ** is an infix operator, and you can use it in two ways: - x ** y - ( ** ) x y in the latter,...
2821 Henrique
henriecosta Send Email
Dec 9, 2004
5:29 pm
_____ From: Joe Polanik [mailto:jpolanik@...] Sent: quinta-feira, 9 de Dezembro de 2004 16:24 To: ocaml_beginners@yahoogroups.com Subject:...
2822 Aaron W. West
awilliamwest Send Email
Dec 9, 2004
7:09 pm
This seems to work. Remember the spaces; (**) would be the start of a comment. # let listSquares = (map ( ( ** ) 2. ) listFloat) in List.iter (fun y -> ...
2823 Karl Zilles
kzilles Send Email
Dec 9, 2004
8:18 pm
... Well, it runs. But it clearly doens't do what he expects it to do. That's because ( ( ** ) 2. ) is the function f(x)=2^x, and not f(x)=x^2 like he wanted....
2824 Joe Polanik
jpolanik Send Email
Dec 9, 2004
8:39 pm
... Right. I wanted squares of numbers not powers of two. Here's what I was working on at the time, s program that computes a standard deviation: (Note:...
2825 Karl Zilles
kzilles Send Email
Dec 9, 2004
9:53 pm
... The map and fold functions are definitely in the function spirit. I would avoid using an object at all, and just create a standard deviation function: open...
2826 Heiko.Kuhrt@...
heikuh Send Email
Dec 10, 2004
9:25 am
Hello ocamlers, yesterday Joe Polanik came up with a program reading lines from "Deviation.dat". I changed 'getData&#39; to what I think is functional progamming...
2827 Karl Zilles
kzilles Send Email
Dec 10, 2004
9:41 am
... My understanding is that OCaml does not specify the order in which it evaluates the arguments to a function. In your case, the function is the (::)...
2828 Joe Polanik
jpolanik Send Email
Dec 10, 2004
2:31 pm
... Actually, I did that first and came up with something very similar. But I was uncomfortable with all those 'in' statements. Do successive 'in' statements...
2829 Richard Jones
rwmjones Send Email
Dec 10, 2004
3:28 pm
... They do, but you don't need to worry about this. I happily write code like this: let foo = ... in let foo = ... in let bar = ... in etc. Note that it's...
2830 Seth J. Fogarty
aravthamis Send Email
Dec 10, 2004
4:52 pm
... You can also use let foo = ...;; ... -- Seth Fogarty sfogarty@[gmail.com|rice.edu|livejournal] Neep-neep at large AIM: Sorrath "I know there...
2831 Richard Jones
rwmjones Send Email
Dec 10, 2004
5:12 pm
... You can do. Actually what I meant, but didn't make clear, was use of "let foo = ... in" within functions. A concrete example from COCANWIKI...
2832 Matt Gushee
mcgushee Send Email
Dec 10, 2004
7:19 pm
... I'm sure there are cases where reusing names is useful, and this may be one of them--it appears here that, conceptually speaking, the first and second...
2833 Tony Edgin
tonyedgin Send Email
Dec 10, 2004
8:06 pm
On Sat, 11 Dec 2004 03:28, Joe Polanik wrote: [SNIP] ... Yep, as long as all objects are of the same type. ... Yep again. Here is how you'd return a reference...
2834 Richard Jones
rwmjones Send Email
Dec 10, 2004
9:58 pm
... [good discussion of when to reuse names, and when not] Another way to write this which also avoids leaking names is to use further nesting: let page = let...
Messages 2805 - 2834 of 13890   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