[m-rev.] for review: add string.format_table/2

Ian MacLarty maclarty at cs.mu.OZ.AU
Fri Feb 4 15:00:01 AEDT 2005


On 4 Feb 2005, at 14:27, Ralph Becket wrote:
>> +:- func find_max_length(justified_column) = int.
>> +
>> +find_max_length(left(Strings)) = MaxWidth :-
>> +	list.foldl(max_str_length, Strings, {0, ""}, {MaxWidth, _}).
>> +find_max_length(right(Strings)) = MaxWidth :-
>> +	list.foldl(max_str_length, Strings, {0, ""}, {MaxWidth, _}).
>
> It would be better to use list.foldl2 and make max_str_length a
> predicate, rather than use tuples.
>

Okay, I've used foldl2.  max_str_length is already a predicate though 
(?).

Ian.

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list