operator types: compound


compound:
    description:
        compound operator
        an operator that has constant parameters, denoted: compound-op[... params ...]
        those parameters can be of type: integer, float, simple operator, *, or string
        if you require variable parameters, then you need to look at function operators instead

    examples:
        -- a quick way to generate a list with less typing:
        split[" "] |one two three four five six seven>
            |one> + |two> + |three> + |four> + |five> + |six> + |seven>


        -- learn some basic knowledge about Fred and Sam:
        friends |Fred> => |Jack> + |Harry> + |Ed> + |Mary> + |Rob> + |Patrick> + |Emma> + |Charlie>
        age |Fred> => |32>

        friends |Sam> => |Charlie> + |George> + |Emma> + |Jack> + |Robert> + |Frank> + |Julie>
        age |Sam> => |34>

        -- now display it as a table:
        table[person, age, friends] split[" "] |Fred Sam>
            +--------+-----+-----------------------------------------------------------+
            | person | age | friends                                                   |
            +--------+-----+-----------------------------------------------------------+
            | Fred   | 32  | Jack + Harry + Ed + Mary + Rob + Patrick + Emma + Charlie |
            | Sam    | 34  | Charlie + George + Emma + Jack + Robert + Frank + Julie   |
            +--------+-----+-----------------------------------------------------------+

    see also:
        table, split

Home