I'm glad this group was formed. I have been one of the (many?) people who read nearly every message of the main list but never posted once. Looking forward...
3
Matthew O'Connor
matthew.oconnor@...
Feb 7, 2002 5:03 am
Hi, I was wondering how I would go about adding functions that take no arguments into a list? Can it be done? If not why not? Thanks in advance, Matthew...
4
stalkern2
stalkern2@...
Feb 7, 2002 7:38 am
1) A list of functions exists (well, it's functional programming after all) # let fof x y = x*y;; val fof : int -> int -> int = <fun> # let fof1 x y = x+y;; ...
5
stalkern2
stalkern2@...
Feb 7, 2002 10:39 am
I'm using Ocaml 3.04. I found this at http://caml.inria.fr/ocaml/Changes ========================================================= - Libraries (.cma and .cmxa...
I'm not sure what you meant. All functions must take parameters. Do you mean a function that takes parameters, but just wasn't given any? Then make sure all...
... even simpler : you don't have to make new toplevel : $ ocaml Objective Caml version 3.04 # #load "graphics.cma";; # Graphics.open_graph "";; .... -- Rémi...
8
info@...
Feb 7, 2002 12:17 pm
Matthew O'Connor <matthew.oconnor@...> schrieb am 07.02.2002, ... I think I have understood your problem. In other languages, functions usually take n...
9
stalkern2
stalkern2@...
Feb 7, 2002 3:21 pm
Hey Gerd, I'm a beginner so slow down a bit ;-)) You should say not that "Every function takes exactly one argument and returns exactly one result value." but...
10
doug+ml.ocaml_beginne...
Feb 7, 2002 5:24 pm
... Well, in fact, what Gerd wrote is exactly true, and I think that understanding his statement a little more deeply will result in a greater appreciation of...
11
doug+ml.ocaml_beginne...
Feb 7, 2002 5:34 pm
... I apologize for my bad grammar! I meant: Any function that takes more than one argument can be thought of as a function that takes the first argument and...
Hi. I am trying to get my feet wet with C code, but I find the docs on confusing. So I hope someone will give me feedback... I'm trying to write my own...
13
stalkern2
stalkern2@...
Feb 7, 2002 6:12 pm
Does this mean that every language where one function can be written with several arguments also accepts partial applications? (f x) seem to be a partial...
14
doug+ml.ocaml_beginne...
Feb 7, 2002 6:30 pm
... I'm not sure, but I think that partial application is a property of most (all?) functional languages, but it is definately not a feature of most imperative...
15
stalkern2
stalkern2@...
Feb 7, 2002 6:50 pm
Why does #let oc = open_out_gen [Open_creat; Open_trunc; Open_text] 664 "./bofcopy.txt";; val oc : out_channel = <abstr> create a file with permissions...
16
stalkern2
stalkern2@...
Feb 7, 2002 6:58 pm
What is refactoring? I didn't know this word, so I looked for it and I found ...
17
doug+ml.ocaml_beginne...
Feb 7, 2002 7:03 pm
... The "refactoring guy", Martin Fowler also has a website: http://www.refactoring.com/ cheers, doug...
18
doug+ml.ocaml_beginne...
Feb 7, 2002 7:41 pm
... [...] ... I believe that you have made a mistake in the radix of your input! You put: 664, which is a decimal number. You want 0o664, which is an octal...
19
Henrik Motakef
henrik.motakef@...
Feb 7, 2002 8:11 pm
Hi. I have some problems with the type system, and whether to use "plain" types and functions, or the OO approach. The (toy) problem I chose to teach myself...
... you could use the polymorphic variant : type literal = [ `Literal of string ] type resource = [ `Resource of string ... type node = [ `Resource of string ...
21
Henrik Motakef
henrik.motakef@...
Feb 7, 2002 9:23 pm
Remi VANICAT <vanicat+egroups@...> writes: Thanks for your reply. ... Am I right thinking that "`Literal of string" would translate to ...
... no exactly : # let x = `Literal "foo";; val x : [> `Literal of string] = `Literal "foo" this mean that x ... yes you do. A class must not have any open...
23
Matthew O'Connor
matthew.oconnor@...
Feb 7, 2002 10:14 pm
Hi, Firstly thanks to everyone for there responses on my first posting. They were very helpful and I am glad that this mail list was created. Coming from a C++...
... very easily, for example : class ['a] myList (x : 'a) (f : 'a -> unit) = object var an_obj = x method apply () = f x end -- Rémi Vanicat ...
25
Henrik Motakef
henrik.motakef@...
Feb 7, 2002 10:29 pm
... I just re-read the chapter on polymorphic variants in the manual (I had a feeling like "Aah - now I get what they are talking about" - but I guess it won't...
26
Matthew O'Connor
matthew.oconnor@...
Feb 7, 2002 10:39 pm
Thankyou Gerd, Your response was exactly what I was looking for. You understood my question perfectly. Thanks to everyone else for Cheers, Matthew...
... not exactly. You really add an information, the fact that statement is a parametrized class, depending of three type (something very similar to template in...
... the interesting thing about the [> `Literal of string] is that x can be use everywhere one is looking for a `Literal of string, even if it is a closed type...
29
Gerd Stolpmann
info@...
Feb 7, 2002 11:14 pm
I think you are on the right way. ... I expected that you find that surprising. Before I comment on your examples, I want to point out that there is a...
30
stalkern2
stalkern2@...
Feb 8, 2002 10:29 am
Yes! what you sent is straigth and simple (and gives 0o664 permissions) and I don't mind that String.create comes from outside the standard library because I...