On Saturday, 26 July 2014 at 20:49:30 UTC, seany wrote:
Can a function return a function in D? Sorry if i missed the
answer somewhere
Yup, you can return functions, delegates, or function pointers.
int function(int) returnsFunc1()
{
return function(int n) { return n; };
}
int function
On Saturday, 26 July 2014 at 20:49:30 UTC, seany wrote:
Can a function return a function in D? Sorry if i missed the
answer somewhere
Just alias your function signature:
```d
alias MyFunctionType = void function(int);
```
Example from my own code:
```d
alias DeserializeBody = TLObject functio
Can a function return a function in D? Sorry if i missed the
answer somewhere
On Saturday, 26 July 2014 at 00:28:32 UTC, Ary Borenszweig wrote:
No, the OP said the meaning was `myrange.dropExactly(i).front`,
which is not a random access.
Sometimes you *do* want the n-th element of a range even if the
range is not a random access.
What he did also say is he wanted the
On Sat, Jul 26, 2014 at 05:14:44PM +, via Digitalmars-d-learn wrote:
> Hmmm... thinking about it, is this possible?
>
> 1. Remove the constraints to match anything.
> 2. Inside the template, have some construct that enumerates all possible
> overloads and UFCS functions that are visible at the
Hmmm... thinking about it, is this possible?
1. Remove the constraints to match anything.
2. Inside the template, have some construct that enumerates all
possible overloads and UFCS functions that are visible at the
point of instantiation.
3. If this set contains only the current template, use
On Friday, 25 July 2014 at 21:10:56 UTC, monarch_dodra wrote:
Functionally nothing more than an alias? EG:
{
alias baz = foo.bar;
...
}
Yes, it is all just alias. So
with ( (d,e,a,b,c) as (ar.rm.a, ar.rm.b, ar.r.a, ar.r.b, ar.r.c)){
d = a + c;
e = (c==0)?0:(a+b)/c;
}
could
Yeah that's the price we pay for the simplicity.
Also most constraints directly or indirectly consist of a complex
boolean expressions and you don't get any hint which part failed
and why.
Hi,
Ddoc doesn't seem to expand a macro near top of
http://dlang.org/hash-map.html:
// The $(CODE_HIGHLIGHT KeyType) is string
Which is weird because it expands it for 'remove' on this line not far
below it:
b.remove("hello");
Maybe a bug in dmd?
Also, I build some dlang.org docs individu
is there any way to detect if a file is a binary executable that
is cross platform or a way to detect whether pipeprocss failed to
execute a file if it wasn't executable.
AFAIK, Variant is not transparent. You can't write
parsed["field1"]["field2"], it should be
parsed["field1"].get!(Variant[string])["field2"].
11 matches
Mail list logo