diff --git a/pages/docs/streaming/sink/operations.mdx b/pages/docs/streaming/sink/operations.mdx index 584685156..638e1b475 100644 --- a/pages/docs/streaming/sink/operations.mdx +++ b/pages/docs/streaming/sink/operations.mdx @@ -4,17 +4,17 @@ In the previous sections, we learned how to create and use sinks. Now, let's exp ## Changing the Input -Sometimes, you have a sink that works perfectly with one type of input, but you want to use it with a different type. This is where `Sink.contramap` comes in handy. While `map` modifies the output of a function, `contramap` modifies the input. It allows you to adapt your sink to work with a different input. +Sometimes, you have a sink that works perfectly with one type of input, but you want to use it with a different type. This is where `Sink.mapInput` comes in handy. While `map` modifies the output of a function, `mapInput` modifies the input. It allows you to adapt your sink to work with a different input. -Imagine you have a `Sink.sum` that calculates the sum of incoming numeric values. However, your stream contains strings, not numbers. You can use `contramap` to convert your strings into numbers and make `Sink.sum` compatible with your stream: +Imagine you have a `Sink.sum` that calculates the sum of incoming numeric values. However, your stream contains strings, not numbers. You can use `mapInput` to convert your strings into numbers and make `Sink.sum` compatible with your stream: -```ts file=/src/streaming/sink/operations/contramap.ts +```ts file=/src/streaming/sink/operations/mapInput.ts ``` ## Transforming Both Input and Output -If you need to change both the input and output of a sink, you can use `Sink.dimap`. It's an extended version of `contramap` that lets you transform both types. This can be useful when you need to perform a complete conversion between your input and output types: +If you need to change both the input and output of a sink, you can use `Sink.dimap`. It's an extended version of `mapInput` that lets you transform both types. This can be useful when you need to perform a complete conversion between your input and output types: ```ts file=/src/streaming/sink/operations/dimap.ts diff --git a/src/streaming/sink/operations/contramap.ts b/src/streaming/sink/operations/mapInput.ts similarity index 100% rename from src/streaming/sink/operations/contramap.ts rename to src/streaming/sink/operations/mapInput.ts