// Prompt

Translate code to another language

Ports code to another language idiomatically, not line by line.

Raw
Translate this {{FROM LANGUAGE}} code to idiomatic {{TO LANGUAGE}}.

- Use the target language's standard library and conventions, not a literal line-by-line port.
- Keep the same behavior, including error cases and edge cases.
- Point out any behavior that cannot map exactly (integer overflow, null handling, concurrency) and how you handled it.
- Add a few tests in the target language that prove the behavior matches.

```
{{CODE}}
```