On Wednesday, 7 July 2021 at 19:52:30 UTC, Sebastiaan Koppe wrote:

Just lift each item in a range then:

```d
import std;

auto foo(string s, string sp, string j) @nogc {
     return s.splitter(sp).map!(i => only(i)).joiner(only(j));
}
```

Code golf: `map!(i => only(i))` can be shortened to `map!only`.

Reply via email to