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 4641 - 4670 of 9747   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
4641
... Nice explanation. I think it would have been easier to follow if you would have used sequential addresses 0, 1, 2, 3, ... or maybe a_0, a_1, a_2, ... ....
Radu Grigore
radugrigore
Offline Send Email
Oct 1, 2005
7:06 am
4642
Hello, after I have learned to write tail-rec code I have forgotten how to write these direct style, somtimes called "silly style" or "stupid style", or "naive...
Oliver Bandel
oliver@...
Send Email
Oct 1, 2005
10:37 am
4643
... I doubt it is. It explains what is going on internally with memory allocation and so on. But it does not explain why it is allowed to do such definitions...
Oliver Bandel
oliver@...
Send Email
Oct 1, 2005
1:47 pm
4644
... [...] Which style best using for automatically closing e.g. filedescriptors after read was completed? Using closures, CPS, Monads, .... ? Isn't CPS-style...
Oliver Bandel
oliver@...
Send Email
Oct 1, 2005
1:48 pm
4645
... let rec suf = function [] -> [] | h :: t -> (h :: t) :: (suf t);; __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 ...
Radu Grigore
radugrigore
Offline Send Email
Oct 1, 2005
2:20 pm
4646
Hi everybody, this is my first post and I'm a VERY beginner of ml programming :-) So, let's start: # function x -> function y->x y;; - : ('a -> 'b) -> 'a ->...
Java
segolas1212
Offline Send Email
Oct 1, 2005
2:47 pm
4647
... Well, did you try to put parenthesis to see what realy happen? The code you give us is equivalent to fun x -> fun y -> (x y) and (x y) mean that y is given...
Remi Vanicat
dl_ens
Offline Send Email
Oct 1, 2005
3:10 pm
4648
... (x y) mean x is a function with y as argument???? ... mmm... my mind was born with imperative languages, so I think that something like this: fun x...
Java
segolas1212
Offline Send Email
Oct 1, 2005
4:30 pm
4649
... The application of the function f to 10 is wrote f 10 so the application of the function x to y is wrote x y then you can put parenthesis around this. ... ...
Remi Vanicat
dl_ens
Offline Send Email
Oct 1, 2005
5:21 pm
4650
. . . ... Interesting. I hacked around more than I expected, too :-). Here's what I came up with: # let suffixes list = let rec suffixes_aux li = match li...
a22_19_22
Offline Send Email
Oct 1, 2005
5:39 pm
4651
... ooops: ============================================================= suf = function [] -> [] | h :: t -> (h :: t) :: (suf t);; val suf : 'a list -> 'a list...
Oliver Bandel
oliver@...
Send Email
Oct 1, 2005
5:49 pm
4652
On Sat, Oct 01, 2005 at 01:23:42PM +0200, Oliver Bandel wrote: [...] ... Ciao, Oliver...
Oliver Bandel
oliver@...
Send Email
Oct 1, 2005
5:49 pm
4653
... [...] thanks. Oliver...
Oliver Bandel
oliver@...
Send Email
Oct 1, 2005
5:50 pm
4654
. . . ... Almost, I think. To get [] at the end, tails have to be accumulated: let rec suf = function [] -> [] | h :: t -> t :: (suf t) But then we need the...
a22_19_22
Offline Send Email
Oct 1, 2005
5:55 pm
4655
... I'm not sure why would you want that empty list: it caries no information since it will always be there. let rec suf = function [] -> [[]] | h :: t -> (h...
Radu Grigore
radugrigore
Offline Send Email
Oct 1, 2005
7:20 pm
4656
Hello, look at this example with lesser types... ...it was what I first thought could be a possible problem, and it seems it is one: ...
Oliver Bandel
oliver@...
Send Email
Oct 2, 2005
10:30 am
4657
... These aren't syntatic constructs, they are semantic ones. And, IMO, using the idea of 'locations' in semantics is perfectly valid. For OCaml it is even...
Seth J. Fogarty
aravthamis
Offline Send Email
Oct 2, 2005
7:40 pm
4658
... I am not certain what the difference is between closures and CPS. CPS, in OCaml, is implemented using closures. I'll also note that CPS can be considered a...
Seth J. Fogarty
aravthamis
Offline Send Email
Oct 2, 2005
7:47 pm
4659
... Because this is, what the execise is looking for a s a result. (Okasaki-Book). ... Yes, now it's correct. ;-) Ciao, Oliver...
Oliver Bandel
oliver@...
Send Email
Oct 2, 2005
8:40 pm
4660
. . . No, the behavior is /very/ well defined. Just not terribly useful. I gotta put my $.02 in here (I think there was a brief mention of cyclic lists in this...
a22_19_22
Offline Send Email
Oct 2, 2005
9:09 pm
4661
... Well, I stand gladly corrected. ... These shouldn't be terribly hard to rewrite this way... it's a bit of a strange way of thinking about them, but it's...
Seth J. Fogarty
aravthamis
Offline Send Email
Oct 3, 2005
12:21 am
4662
. . . ... Well, I'm glad to hear it :-) . . . ... It depends on what you get used to, I guess. Common Lisp supports variable-arity functions, so mapping a...
a22_19_22
Offline Send Email
Oct 3, 2005
1:20 am
4663
... No, they're not: let rec fold_left2' f init alist blist = match alist, blist with ... ;; let rec fold_right2' f alist blist init = (* NOT tail recursive *)...
Brian Hurt
bhurt42
Offline Send Email
Oct 3, 2005
1:35 am
4664
... This works: # let rec suf = function | [] -> [ [] ] | (_ :: t) as e -> e :: (suf t);; val suf : 'a list -> 'a list list = <fun> # suf [1;2;3;4];; - : int...
Brian Hurt
bhurt42
Offline Send Email
Oct 3, 2005
1:48 am
4665
Shalom, Oliver. OB> I doubt it is. OB> It explains what is going on internally with memory allocation and so on. OB> But it does not explain why it is allowed...
dmitry grebeniuk
dmitrygrebeniuk
Offline Send Email
Oct 3, 2005
6:07 am
4666
... Well we can assure you that OCaml certainly does support native TCP/IP sockets through the Unix module in the standard library. Could somebody introduce a...
Richard Jones
rwmjones
Offline Send Email
Oct 3, 2005
1:35 pm
4667
Ok, it looks like we always have more than 2 choices ;) Thanks you Richard for so sufficient response. At this point we can go ahead. The issue is resolved....
Alexey Nikolayev
alexeynikolayev
Offline Send Email
Oct 3, 2005
3:39 pm
4668
... Exactly, yes. You can write in conventional mathematical notation like this: # let f(x) = x+1;; val f : int -> int = <fun> # f(3);; - : int = 4 But the...
Jon Harrop
harropjon
Offline Send Email
Oct 3, 2005
6:54 pm
4669
thanks for all the help you give me! now i'm starting to understand and ca say fun x -> fun y ->(x y);; - : ('a -> 'b) -> 'a -> 'b = <fun> I can say first...
Java
segolas1212
Offline Send Email
Oct 4, 2005
9:23 pm
4670
... Yes! -- Martin Jambon, PhD http://martin.jambon.free.fr Freedom for the regexps! http://martin.jambon.free.fr/micmatch-howto.html...
Martin Jambon
BioMim
Offline Send Email
Oct 4, 2005
9:29 pm
Messages 4641 - 4670 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