         [ drop { 0 } unique ]
     } 1&& ;
 
-: update-selected-indices ( table -- {n}/f )
+: update-selected-indices ( table -- set )
     {
         [ (update-selected-indices) ]
         [ initial-selected-indices ]

M: table model-changed
    nip dup update-selected-indices {
        [ >>selected-indices f >>mouse-index drop ]
        [ [ f ] [ first ] if-empty show-row-summary ]
        [ drop update-selected ]
        [ drop relayout ]
    } 2cleave ;

    over selected-indices>> conjoin ;

: multiple>single ( values -- value/f ? )
    dup assoc-empty? [ drop f f ] [ values first t ] if ;

: selected-index ( table -- n )
    selected-indices>> multiple>single drop ;
