[m-rev.] for review: Add integer.to_base_string.

Peter Wang novalazy at gmail.com
Tue Feb 17 12:32:01 AEDT 2015


On Mon, 16 Feb 2015 17:28:17 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> > +    % the predicate will throw an exception.
> > +    %
> > +:- func to_base_string(integer, int) = string.
> > +:- pred to_base_string(integer::in, int::in, string::out) is det.
> 
> Is it worth providing a predicate version of this?

Removed.

I think in the case of string.int_to_base_string, the argument order is
non-obvious but a bit more understandable in the predicate form.  Not
that it has a direct bearing on integer.to_base_string.

    string.int_to_base_string(Int, Base, String)

    String = string.int_to_base_string(Int, Base)

Peter



More information about the reviews mailing list