I think the difficult part is passing in an arbitrary name to a function, for which the tables 'name' becomes set to, but I am just guessing that's what he wants...
and I agree I don't see a whole lot of need for the function to be part of the arc release..., since there are probably better ways to accomplish the same end result.... a good example of which is news.arc's storage of story records.
I think the difficult part is passing in an arbitrary name to a function, for which the tables 'name' becomes set to, but I am just guessing that's what he wants...
I rather doubt that's the issue, as it's easy to do with a macro.
arc> (mac filltbl (tbl keys vals)
`(= ,tbl (fill-table (table) (mappend list ,keys ,vals))))
#3(tagged mac #<procedure: filltbl>)
arc> (filltbl blah '(a b c) '(1 2 3))
#hash((c . 3) (a . 1) (b . 2))
arc> blah
#hash((c . 3) (a . 1) (b . 2))
I think it's just a request for a convenience function to zip together a list of keys with a list of values into a table, since the existing methods for creating tables center around having alternating key/value pairs.