Crawl Space Library - Example of how to use table.shuffle?

Can someone provide an example of how to use the table.shuffle function of the “Crawl Space Library” library?

Could I use it to “print” out the contents of a table to the console for debug?

EDIT: Mistakenly initially had written “Ice” library instead of “Crawl Space Library”… [import]uid: 140210 topic_id: 24999 reply_id: 324999[/import]

There isn’t a “table.shuffle” function in Ice, or in Lua for that matter. You could add one in to your code if you wanted, something like this:

http://www.gammon.com.au/forum/?id=9908

There is a “print” function in Ice if you wanted to print out the contents of an IceBox. [import]uid: 5833 topic_id: 24999 reply_id: 101552[/import]

oops - typo - I meant the “Crawl Space Library” not “Ice” sorry - I’ll change the title… [import]uid: 140210 topic_id: 24999 reply_id: 101564[/import]

Ah right, no worries!

Assuming the shuffle function is what I would think it is then it’s not really used for printing, it would be more for randomising the order of the elements in the table i.e. like shuffling a deck of cards. [import]uid: 5833 topic_id: 24999 reply_id: 101565[/import]

oh, so in fact what I was interested in is how to make use of the function someone mentioned in the posts section which was “Especially the ability to print tables makes debugging so much easier.”

I’ve misunderstood that the table.shuffle might have been the function.

So again, was just after an example of how to do debug prints of tables. In fact I had in mind the ability to put a debug “print” in which printed the contents of an IceBucket (hence there’s the link to Ice). In the Ruby on Rails world it would be just printing “my_object.to_yaml”, but looking for the equivalent in the Corona/Lua world [import]uid: 140210 topic_id: 24999 reply_id: 101572[/import]