KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Lists, dictionaries, tables and lists of dictionaries Re: Lists, dictionaries, tables and lists of dictionaries

  • sstantoncook

    Member
    September 15, 2021 at 12:00 am

    Hi Simon,

     

    I agree with Rian in term of the generalisation of k data types. I.e.

    • Atom is a scalar representation of a data type.
    • List is a vector representation of an Atom.
    • Dictionary is a keyed set of lists. The key can be a List of any type. The values can a list of any type, a list of lists and list of Dictionaries.
    • Table is a List of commonly keyed Dictionaries. You can see this easily when you put two dictionaries in a list, or enlist one of them.

    Your point about apply (@;.) – in both cases, dictionaries and lists, it works by indexing.

    Dictionaries require the key value to index and apply the function.

    Lists require the index to index to apply the function.