Skip to content

Commit 19217b2

Browse files
committed
small improvement
1 parent 39cc618 commit 19217b2

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/translator/clause.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,15 @@ function oClause(
157157
emphasis: false,
158158
}]);
159159
return ArrayResult.combine(subject, predicate(clause.predicates, "o"))
160-
.flatMap(([subject, predicate]) =>
161-
ArrayResult.concat(
162-
verb(predicate, perspective(subject), subject.quantity)
160+
.flatMap(([subject, predicate]) => {
161+
const subjectPerspective = perspective(subject);
162+
return ArrayResult.concat(
163+
verb(predicate, subjectPerspective, subject.quantity)
163164
.map<English.Clause>((verb) => iWish(subject, verb)),
164165
ArrayResult.from(() =>
165166
verb(
166167
addModalToAll(unemphasized("should"), predicate),
167-
perspective(subject),
168+
subjectPerspective,
168169
subject.quantity,
169170
)
170171
)
@@ -174,8 +175,8 @@ function oClause(
174175
verb,
175176
hideSubject: false,
176177
})),
177-
)
178-
);
178+
);
179+
});
179180
}
180181
export function clause(clause: TokiPona.Clause): ArrayResult<English.Clause> {
181182
switch (clause.type) {

0 commit comments

Comments
 (0)