compound context seq fn: common


common:
    description:
        common[op] seq
        find the intersection of op applied to each of the kets in seq
        while trying to preserve sequence structure

    examples:
    -- learn Fred and Sam friends:
    friends |Fred> => |Jack> + |Harry> + |Ed> + |Mary> + |Rob> + |Patrick> + |Emma> + |Charlie>
    friends |Sam> => |Charlie> + |George> + |Emma> + |Jack> + |Robert> + |Frank> + |Julie>

    -- find their common friends:
    common[friends] split[" "] |Fred Sam>
        |Jack> + |Emma> + |Charlie>

    see also:
        op-union, op-sum

Home