class-partition boa ;
: class-partition>sequence ( class-partition -- seq )
- [
- {
- [ integers>> ]
- [ not-integers>> ]
- [ simples>> ]
- [ not-simples>> ]
- [ and>> ]
- [ or>> ]
- [ other>> ]
- } cleave
- ] output>array concat ;
+ {
+ [ integers>> ]
+ [ not-integers>> ]
+ [ simples>> ]
+ [ not-simples>> ]
+ [ and>> ]
+ [ or>> ]
+ [ other>> ]
+ } cleave>array concat ;
: repartition ( partition -- partition' )
! This could be made more efficient; only and and or are effected
dup
[ simples>> ] [ not-simples>> ] [ and>> ] tri
3append or-class boa
- '[ [ _ class-member? not ] filter ] change-integers ;
+ '[ [ _ class-member? ] reject ] change-integers ;
: answer-ands ( partition -- partition' )
dup [ integers>> ] [ not-simples>> ] [ simples>> ] tri 3append