Browse thread
[Caml-list] Calling a function with a self-defined type as argument
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2002-08-22 (01:42) |
From: | SooHyoung Oh <shoh@d...> |
Subject: | Re: [Caml-list] Calling a function with a self-defined type as argument |
> > (* > let _ = x Line "h0oifdaji oi" ;; > This last one does not work: => "This function is applied to too many arguments" > "x" expects only one argument, but it has 2. > let _ = x Line( "reuruhjf" ) ;; > This last one does not work: => "This function is applied to too many arguments" > Same as the first one. In this example, () has no effect. In most cases, "a(b)" is the same meaning as "a b" in Ocaml. > But it works in this way: > let _ = x (Line "reuruhjf") ;; > > WHY? (why *only* that?) > "x" is applied to one argument. > At least the second example (with parantheses around the > Line's arguments) should work...?! > *) --- SooHyoung Oh tel: 02)583-8709, 042)861-8649 cell. phone: 011-453-4303 web: http://www.duonix.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners