[Issue 14562] New: Support BigInt function std.range.repeat and other functions of Phobos
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat May 9 10:47:30 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14562
Issue ID: 14562
Summary: Support BigInt function std.range.repeat and other
functions of Phobos
Product: D
Version: future
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: Phobos
Assignee: nobody at puremagic.com
Reporter: dennis.m.ritchie at mail.ru
I believe that the repeat function and other functions of Phobos, where the use
BigInt appropriate, should support BigInt.
For example,
-----
import std.stdio : writeln;
import std.range : repeat;
import std.bigint : BigInt;
void main() {
int a = 4, b = 15;
writeln(a.repeat(b)); // OK
// [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4]
BigInt c = 4, d = 15;
// writeln(c.repeat(d)); // error
// template std.range.repeat cannot
// deduce function from argument types !()(BigInt, BigInt)
// std.range.repeat(T)(T value, size_t n)
}
--
More information about the Digitalmars-d-bugs
mailing list