@@ -33,13 +33,11 @@ function applyToAndTurnInto(
3333 predicate : English . NounPhrase ,
3434 object : English . NounPhrase ,
3535) {
36- return IterableResult . concat (
37- IterableResult . fromArray (
38- nullableAsArray ( extractNegativeFromNoun ( predicate ) ) ,
39- )
40- . map ( ( predicate ) => [ true as boolean , predicate ] ) ,
41- IterableResult . single ( [ false as boolean , predicate ] ) ,
42- )
36+ return IterableResult . fromArray ( [
37+ ...nullableAsArray ( extractNegativeFromNoun ( predicate ) )
38+ . map ( ( predicate ) => [ true , predicate ] as const ) ,
39+ [ false , predicate ] as const ,
40+ ] )
4341 . flatMap ( ( [ negated , predicate ] ) =>
4442 IterableResult . fromArray ( [
4543 {
@@ -88,13 +86,11 @@ function applyToAndTurnInto(
8886 ) ;
8987}
9088function make ( predicate : AdjectiveWithInWay , object : English . NounPhrase ) {
91- return IterableResult . concat (
92- IterableResult . fromArray (
93- nullableAsArray ( extractNegativeFromAdjective ( predicate . adjective ) ) ,
94- )
95- . map ( ( adjective ) => [ true as boolean , adjective ] ) ,
96- IterableResult . single ( [ false as boolean , predicate . adjective ] ) ,
97- )
89+ return IterableResult . fromArray ( [
90+ ...nullableAsArray ( extractNegativeFromAdjective ( predicate . adjective ) )
91+ . map ( ( adjective ) => [ true , adjective ] as const ) ,
92+ [ false , predicate . adjective ] as const ,
93+ ] )
9894 . map ( ( [ negated , adjective ] ) => ( {
9995 type : "simple" ,
10096 modal : null ,
0 commit comments