ket fn: extract-value


extract-value:
    description:
        extract-value ket
        extract the value, ie, remove the category, from the given ket
        categories are separated by ": "
        with the most general category on the left, and the most specific on the right
        for example |animal: mammal: dog>
        has the most general category "animal", then the category "mammal" and then finally the "value" dog
        categories can be considered a type for the object
        and values are specific examples of that type
        Eg, |food: apple> says apple is a type of food, and the value of |food: apple> is apple

    examples:
        -- if there is no category, then return unchanged:
        extract-value |dog>
            |dog>

        extract-value |animal: mammal: dog>
            |dog>

        -- an abstract example:
        extract-value |a: b: c: d: e: f>
            |f>

    see also:
        extract-category, extract-head, extract-tail
Home