@@ -33,13 +33,11 @@ function applyToAndTurnInto(
33
33
predicate : English . NounPhrase ,
34
34
object : English . NounPhrase ,
35
35
) {
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
+ ] )
43
41
. flatMap ( ( [ negated , predicate ] ) =>
44
42
IterableResult . fromArray ( [
45
43
{
@@ -88,13 +86,11 @@ function applyToAndTurnInto(
88
86
) ;
89
87
}
90
88
function 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
+ ] )
98
94
. map ( ( [ negated , adjective ] ) => ( {
99
95
type : "simple" ,
100
96
modal : null ,
0 commit comments