From: Johann H. <jhi...@ya...> - 2004-01-31 02:12:28
|
function pickle (x) ... return format ("%q", x) -- That should be "string.format", I believe. I'd suggest: function round(x, n_digits) local p_10 = 10 ^ n_digits return math.floor(x * p_10 + 0.5) / p_10 end as well as second the trim, rtrim, ltrim, and join functions for inclusion eventually. It's been a while since I've used lua heavily, so we'll just have to wait and see what I come up with. I've written implementations for most of the Common Lisp sequence functions, using a final table argument to pass the keyword arguments, if anyone is interested. -Johann |