 GENERIC: n/v ( n v -- w )
 M: object n/v [ / ] with map ; inline
 
-GENERIC: v+  ( u v -- w )
+GENERIC: v+ ( u v -- w )
 M: object v+ [ + ] 2map ; inline
 
-GENERIC: v-  ( u v -- w )
+GENERIC: v- ( u v -- w )
 M: object v- [ - ] 2map ; inline
 
 GENERIC: [v-] ( u v -- w )


:: vif ( mask true-quot: ( -- vector ) false-quot: ( -- vector ) -- result )
    {
        { [ mask vall?  ] [ true-quot  call ] }
        { [ mask vnone? ] [ false-quot call ] }
        [ mask true-quot call false-quot call v? ]
    } cond ; inline

: vfloor    ( u -- v ) [ floor ] map ;
: vceiling  ( u -- v ) [ ceiling ] map ;
: vtruncate ( u -- v ) [ truncate ] map ;

: vsupremum ( seq -- vmax ) [ ] [ vmax ] map-reduce ; inline

GENERIC: vandn ( u v -- w )
M: object vandn [ [ not ] dip and ] 2map ; inline

GENERIC: vor ( u v -- w )
M: object vor [ or ] 2map ; inline

GENERIC: vxor ( u v -- w )
M: object vxor [ xor ] 2map ; inline
