Browse thread
let int = ?([' ' '\t'] '-') digits+
[
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: | -- (:) |
| From: | Robert C Fischer <robert@f...> |
| Subject: | Re: [Caml-list] let int = ?([' ' '\t'] '-') digits+ |
This got filtered out, I think, so I'm trying again: How would one express "one less than the value returned by function f" if f -1 was treated as f(-1)? ~~ Robert. pzimmer@janestcapital.com wrote: > Do you really want > > x-3*7 > > to be interpreted as > > (x (-3)) * 7 > > ? > > > On Fri, 2007-06-29 at 16:39 +0100, Jon Harrop wrote: > >> If OCaml's lexer handled numbers of this format, would it be possible to >> write: >> >> f -1 -2 >> >> to mean: >> >> f (-1) (-2) >> >> rather than: >> >> f - 1 - 2 >> >> Is this a good idea? >> >> > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > >