[ [ { } ] ] dip
[ new length shuffles-for ] keep
'[
- _ [ [ _ new [ length iota ] keep like 1quotation ] dip '[ _ vshuffle ] ]
+ _ [ [ _ new [ length <iota> ] keep like 1quotation ] dip '[ _ vshuffle ] ]
[ = ] check-optimizer
] unit-test
] each
'[
_ [ [
_ new
- [ [ length iota ] keep like ]
+ [ [ length <iota> ] keep like ]
[ [ length dup dup + [a,b) ] keep like ] bi [ ] 2sequence
] dip '[ _ vshuffle2-elements ] ]
[ = ] check-optimizer
! Test element access -- it should box bignums for int-4 on x86
: test-accesses ( seq -- failures )
- [ length iota dup [ >bignum ] map append ] keep
+ [ length <iota> dup [ >bignum ] map append ] keep
'[ [ _ 1quotation ] dip '[ _ swap nth ] ] [ = ] check-optimizer ; inline
{ { } } [ float-4{ 1.0 2.0 3.0 4.0 } test-accesses ] unit-test
"== Checking broadcast" print
: test-broadcast ( seq -- failures )
- [ length iota >array ] keep
+ [ length <iota> >array ] keep
'[ [ _ 1quotation ] dip '[ _ vbroadcast ] ] [ = ] check-optimizer ;
{ { } } [ float-4{ 1.0 2.0 3.0 4.0 } test-broadcast ] unit-test