Skip to content

Commit

Permalink
docs: fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
susisu committed Sep 23, 2024
1 parent 424dc3a commit 3776218
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare module "@susisu/effectful" {
interface EffectRegistry<T> {
// Reads contents of a file
read: {
// constrains `T` = `string`
// Constrains `T` = `string`
constraint: (x: string) => T;
filename: string;
};
Expand Down Expand Up @@ -98,7 +98,7 @@ function interpretRead<Row extends EffectId, T>(comp: Eff<Row | "read", T>): Eff
return interpret<"read", Row | "async", T>(comp, {
*read(eff, resume) {
const contents = yield* async(readFile(eff.data.filename, "utf-8"));
// Use `constraint` to pass `contents` (which is a `string`) `resume` (which takes a value of type `T`)
// Use `constraint` to pass `contents` (which is a `string`) to `resume` (which takes a value of type `T`)
return yield* resume(eff.data.constraint(contents));
},
});
Expand Down

0 comments on commit 3776218

Please sign in to comment.