-
formatting a table with @ (apply) to use lists as a format type (for example symbol "s" is "S")
Hi Team,
I’m wondering how to use the @ (apply) paradigm to set a table column so that it accepts lists rather than atoms.
The below illustrates my problem. I can use @ (apply) to cast a column to an atomic data type but can’t seem to manage to get it to a listed datatype.
// define an empty table tbl:flip `ref`stamp`note`usr!(`symbol$();`timestamp$();"";()) //use apply to make column usr a symbol type: @[tbl;`usr;{y$x};"s"] // works (test using meta tbl) //use apply to make column note a string type (nested character): @[tbl;`usr;{y$x};"C"] // does not work - result is a column of type c (single character) (test using meta tbl)
My question is:
Is there a way to use apply (@) to set a column in a table to a nested data type (so “C” for a string or “S” for a list of symbols for each record)?
Regards,
Simon
Log in to reply.