enum question

ll:“1 2 3 1 2 3 1 2 3”

k)ul:(“1”;“2”;“3”)

`ul$ll /type error

ul$ll /length error

Can enums be done with non symbol lists ?

Hi,

Is this perhaps similar to what you’re looking for? Not using the build in enum (e:`x$y)

q)ll

“1 2 3 1 2 3 1 2 3”

q)ul

“123”

q)show e:ul?ssr[ll;" “;”"]              (ssr to remove the blank space from the string, if you want this enumed then you can keep it in)

0 1 2 0 1 2 0 1 2

Regards,
Matt

if it’s just a char, you could use the same char as it’s “code” (1byte + overhead) - do you gain much by enumerating at all?

of course, for arbitrary lists, you need a strategy, eg for strings, `$ and enumerate