This isn't compiles. Bug? import std.range; class Foo {} void main() { immutable(Foo)[] a; immutable(Foo)[] b; auto c = chain(a, b).length; } http://dpaste.dzfl.pl/71272a10