* "catch-all" labels?
@ 2000-02-13 17:42 Markus Mottl
0 siblings, 0 replies; only message in thread
From: Markus Mottl @ 2000-02-13 17:42 UTC (permalink / raw)
To: OCAML
Hello,
in some function applications labels seem to be somewhat more clumsy than
their unlabeled version, e.g.:
# List.fold_left fun:(+) acc:0 [1;2;3];;
This expression has type int -> int -> int but is here used with type
acc:'a -> 'b -> 'a
Would it make sense to introduce something like "catch-all" labels, which
might be useful in functions like "+" where the order of parameters does
not matter, maybe:
let (+) _:x _:y = x + y
which would match any label? (Only curious...)
Regards,
Markus Mottl
--
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-02-13 21:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-02-13 17:42 "catch-all" labels? Markus Mottl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox