misc: |category: *>

|category: *>:
        |category: *>
        see label descent, and |*>.
        this special ket is used if we want to define an operator that is defined with respect to all kets that have the given category
        instead of being defined with respect to a single specific ket
        so, in some sense it is a function that is only defined for objects of the correct "type", but be aware it is applied ket-wise
        so if you apply it to a superposition or sequence, it will be applied to each sub-ket in turn
        this makes it essentially linear, but not quite, depending on the details of the operator
        it is usually, but not always, defined with respect to stored or memoizing rules

        -- let's define some is-object operators:
        is-food |food: *> => |yes>
        is-food |*> => |no>

        is-book |book: *> => |yes>
        is-book |*> => |no>

        is-furniture |furniture: *> => |yes>
        is-furniture |*> => |no>

        -- now define a list of objects:
        list-of |objects> => |food: apple> + |food: orange> + |book: Tom Sawyer> + |furniture: chair> + |furniture: table> + |food: mango> + |book: Moby Dick>

        -- now filter the list:
        such-that[is-food] list-of |objects>
            |food: apple> + |food: orange> + |food: mango>

        such-that[is-book] list-of |objects>
            |book: Tom Sawyer> + |book: Moby Dick>

        such-that[is-furniture] list-of |objects>
            |furniture: chair> + |furniture: table>

    see also:
        label descent, |*>, |_self>, such-that, #=> , !=>