     [ [ [ underlying2>> ] dip A-rep ] dip call ] 3bi
     \ A boa ; inline
 
-: A-vv->n-op ( v1 v2 quot -- v3 )
+: A-v->v-op ( v1 combine-quot -- v2 )
+    [ [ underlying1>> A-rep ] dip call ]
+    [ [ underlying2>> A-rep ] dip call ] 2bi
+    \ A boa ; inline
+
+: A-v.-op ( v1 v2 quot -- n )
     [ [ [ underlying1>> ] bi@ A-rep ] dip call ]
     [ [ [ underlying2>> ] bi@ A-rep ] dip call ] 3bi
     + ; inline
 
-: A-v->v-op ( v1 combine-quot -- v2 )
-    [ [ underlying1>> A-rep ] dip call ]
-    [ [ underlying2>> A-rep ] dip call ] 2bi
-    \ A boa ; inline
-
-: A-v->n-op ( v1 combine-quot -- v2 )
-    [ [ underlying1>> ] [ underlying2>> ] bi A-rep (simd-v+) A-rep ] dip call ; inline
+: (A-v->n-op) ( v1 quot reduce-quot -- n )
+    '[ [ underlying1>> ] [ underlying2>> ] bi A-rep @ A-rep ] dip call ; inline
+
+: A-sum-op ( v1 quot -- n )
+    [ (simd-v+) ] (A-v->n-op) ; inline
+
+: A-vany-op ( v1 quot -- n )
+    [ (simd-vbitor) ] (A-v->n-op) ; inline
+: A-vall-op ( v1 quot -- n )
+    [ (simd-vbitand) ] (A-v->n-op) ; inline
 
 simd new
     \ A >>class
     \ A-with >>ctor
     \ A-rep >>rep
     {
+        { v.     A-v.-op   }
+        { sum    A-sum-op  }
+        { vnone? A-vany-op }
+        { vany?  A-vany-op }
+        { vall?  A-vall-op }
+    } >>special-wrappers
+    {
         { { +vector+ +vector+ -> +vector+ } A-vv->v-op }
         { { +vector+ +scalar+ -> +vector+ } A-vn->v-op }
         { { +vector+ +literal+ -> +vector+ } A-vn->v-op }
-        { { +vector+ +vector+ -> +scalar+ } A-vv->n-op }
         { { +vector+ -> +vector+ } A-v->v-op }
-        { { +vector+ -> +scalar+ } A-v->n-op }
-        { { +vector+ -> +nonnegative+ } A-v->n-op }
-    } >>wrappers
+    } >>schema-wrappers
 (define-simd-256)
 
 ;FUNCTOR

    ! in the general case.
    elt-class float = [ { distance [ v- norm ] } suffix ] when ;

TUPLE: simd class elt-class ops wrappers ctor rep ;

: define-simd ( simd -- )
    dup rep>> rep-component-type c:c-type-boxed-class >>elt-class
    {
        [ class>> ]
        [ elt-class>> ]
        [ [ ops>> ] [ wrappers>> ] bi low-level-ops ]
        [ rep>> supported-simd-ops ]
        [ [ ctor>> ] [ elt-class>> ] bi high-level-ops assoc-union ]
    } cleave

        { { +vector+ -> +vector+ } A-v->v-op }
        { { +vector+ -> +scalar+ } A-v->n-op }
        { { +vector+ -> +nonnegative+ } A-v->n-op }
    } >>schema-wrappers
(define-simd-128)

PRIVATE>
