In my opinion, this should compile as a matter of convenience.
============
import std.range;
import std.utf;
void main()
{
auto r = chain("test".byCodeUnit, 'a');
}
============
Under the hood, this can be easily translated to
============
auto r = chain("test".byCodeUnit, only('a'));
============
Comment #1 by greensunny12 — 2018-08-15T23:32:31Z
FWIW the built-in concatenation operator also allows this already:
---
([1, 2, 3] ~ 42 ~ [42, 43]).writeln; // [1, 2, 3, 42, 42, 43]
---
https://run.dlang.io/is/md3qKz
Comment #2 by tiberiulepadatu14 — 2018-10-20T15:39:43Z
Can I work on this?
Comment #3 by robert.schadek — 2024-12-01T16:33:53Z