Re: What do you use to get a descending comparator?
Gabriel Scherer <[email protected]>
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <CAPFanBEa6d_7X1Dwgsc40OP5TnF5KQAin6BXLwMtRZp3Fo8WQw@mail.gmail.com> |
You can simply use (BatOrd.rev_comp ...). In BatOrd speak, "ord" is a comparison that returns the nice-to-manipulate Lt, Eq or Gt, and "comp" returns an integer under the legacy conventions. On Wed, Apr 9, 2014 at 7:10 AM, Francois Berenger <[email protected]> wrote: > Hi, > > BatFLoat provides a compare, which is for the ascending order. > > What do batteries' users do to get a descending comparator? > > I think it would be nice if batteries provided > both a compare_asc and a compare_desc... > > -- > Best regards, > Francois Berenger. > > > ------------------------------------ > > Archives up to December 31, 2011 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners > The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr > Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo Groups Links > > >