... Well, it largely depends on how you define the word "nicer" but in the current implementation tuples are basically the same as Arrays (even for tuples of...
... You can factor out a map_3 function: let map_3 f (x, y, z) = f x, f y, f z;; let x, y, z = map_3 int_of_float (f args) in g x y z -- Dr Jon Harrop, Flying...
Jon Harrop
jon@...
Nov 19, 2009 3:19 pm
11568
I have a function, f, returning a tuple of three floats, and a function, g: int -> int -> int -> whatever. Right now I'm saying let (x, y, z) = f args in g...
... Yes. ... The enumeration is not supposed to be faster; it is supposed to be more expressive. ... Specifically, it control inverts the process of iterating...
Jon Harrop
jon@...
Nov 19, 2009 2:54 pm
11566
-[ Wed, Nov 18, 2009 at 05:32:33PM +0000, Jon Harrop ]---- ... Thank you very much for these explanations and comments. I think I understood all of this, but...
... Yes. That's a bit nightmarish because you just turned your elegant tree into a non-trivial graph, significantly increasing the size of a node (therefore ...
Jon Harrop
jon@...
Nov 18, 2009 4:19 pm
11564
... What you're describing there is called a "threaded tree", and I don't (offhand) know of any functional implementations. Maintaining threaded trees is a...
While advertising the OCaml language around me at work showing how nice the red black tree implementation was (the one from Okasaki), I was asked how would one...
It is syntactic sugar for 'bind' - see the documentation at http://ocsigen.org/docu/1.2.0/Lwt.html Tim On Tue, Nov 17, 2009 at 2:04 PM, Rakotomandimby Mihamina...
Hi, ... It is defined here: http://ocsigen.org/docu/1.2.0/Lwt.html Basically, x >>= y is an alternative notation for Lwt.bind x y. The Ocaml language allows...
Hi all, In http://ocsigen.org/eliom/manual/1.2.0/2#p2sessiondata I find this portion of code: [...] let session_data_example_with_post_params_handler sp _...
Bonjour, J'essaye d'installer ocaml sur un NAS Dlink DNS-323 sur lequel j'ai déjà installé fun_plug 0.5 . Je suis complètement novice dans ce domaine. j'ai...
Hello, ... Thanks, that was the reason, I had 2 signatures used... Thanks :) Bye Andreas -- Andreas Romeyke - Abteilung Blindenschrift - Deutsche...
Romeyke, Andreas
andreas.romeyke@...
Nov 16, 2009 1:56 pm
11557
Hi Andreas and Hugo, ... module type Foo = sig val f : int -> int val f : int -> int end;; module Bar : Foo = struct let f x = x let f x = x+1 end;; ... #...
Chantal Keller
chantal.keller@...
Nov 16, 2009 1:49 pm
11556
Hi Andreas, ... Two functions with the same parameters? If this is not an error try using different names for these functions. HTH, Hugo F....
Hello, ... The implementation speedseg.ml does not match the interface (inferred signature): Module type declarations do not match: module type Speedseg = sig ...
Romeyke, Andreas
andreas.romeyke@...
Nov 16, 2009 1:29 pm
11554
Thanks for the response, Rich. If we decide we need one, we'll do our best to open-source our efforts. Cheers, -m...
Hello, http://enfranchisedmind.com/blog/posts/functional-metaprogramming-ruby-groovy/ Just read the first part about Ocaml -> Java. ;-) -- Architecte...
... To calculate the size, I'm sure the easiest way is to use Unix.stat: let chan = open_in_bin "/usr/share/icons/gnome/32x32/actions/lock.png" in let fd =...
Hi all, For a cgi script: I would like to binary open an image file and send it, to the browser, using Netgci. I have the path of the file. How to binary open...
... On Linux (and perhaps other OSs as well?) you can put a .ocamlinit file in your home directory. The toplevel will automatically run the commands in this...
Thank you everyone ! I've tried to play with Toploop.install_printer but building by hand the type expression that's required as second argument seamed not a...
Hi, That could be "hacked/hidden" inside a shell script which creates a special init file: $ echo "let x = 42;;" > /tmp/initocaml ; ocaml -init /tmp/initocaml ...
... Can you get anywhere with ocamlmktop and Toploop.install_printer? -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e...
Jon Harrop
jon@...
Nov 11, 2009 3:15 pm
11544
... You can have a .ocamlinit file which contains start-up commands, but this is very limited because the file must be in the current directory where you start...
Hello ! I'm building a toplevel around a library to help debuging, and I would love to have some printer pre-loaded so that I can start display things as soon...