BV{ 11 23 35 }
} [ { 11 22 33 } [ + ] BV{ } map-index-as ] unit-test
+{ { 0 400 900 } }
+[ { 10 20 30 } [ sq ] 1 map-from ] unit-test
+
+{ V{ 0 400 900 } }
+[ { 10 20 30 } [ sq ] 1 V{ } map-from-as ] unit-test
+
{ t } [ { } { 99 88 } [ <= ] 2all? ] unit-test
{ f } [ { } { 99 88 } [ <= ] 2any? ] unit-test
: setup-each-from ( seq quot -- n quot )
[ [ length ] keep [ nth-unsafe ] curry ] dip compose ; inline
-: map-from-as ( ... from seq quot: ( ... elt -- ... newelt ) exemplar -- ... newseq )
- [ sequence-operator ] dip map-integers-as ; inline
+: map-from-as ( ... seq quot: ( ... elt -- ... newelt ) from exemplar -- ... newseq )
+ -rotd [ sequence-operator nipd ] dip map-integers-from-as ; inline
-: map-from ( ... from seq quot: ( ... elt -- ... newelt ) -- ... newseq )
+: map-from ( ... seq quot: ( ... elt -- ... newelt ) from -- ... newseq )
pick map-from-as ; inline
: map-if ( ... seq if-quot: ( ... elt -- ... ? ) map-quot: ( ... elt -- ... newelt ) -- ... newseq )