[m-rev.] New library module: table.m
Peter Moulder
pmoulder at csse.monash.edu.au
Tue Jan 21 17:50:46 AEDT 2003
On Tue, Jan 21, 2003 at 03:03:26PM +1100, Ralph Becket wrote:
> + % table([[X11, ..., X1N], ..., [XM1, ..., XMN]]) constructs a table
> + % of size M * N.
> + %
> + % An exception is thrown if the sublists are not all the same length.
...
> + ( size(A) \= M * N => error(...) )
You should either reduce your promise about an exception being thrown or
really check each list element rather than just checking the sum of
lengths. (E.g. table([[1,2], [1], [1,2,3]]) won't throw an exception
with the above.)
pjm.
--------------------------------------------------------------------------
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