Re: How can I check if an element is iterable?

2020-05-04 Thread Marcone via Digitalmars-d-learn
On Monday, 4 May 2020 at 01:49:28 UTC, Ali Çehreli wrote: On 5/3/20 1:44 PM, Marcone wrote: [...] Still, the type of a variable would determine whether whether it's iterable. As an improvement, the following program can be changed to call use() recursively to visit all members of e.g. stru

Re: How can I check if an element is iterable?

2020-05-03 Thread Ali Çehreli via Digitalmars-d-learn
On 5/3/20 1:44 PM, Marcone wrote: On Sunday, 3 May 2020 at 20:11:58 UTC, Adam D. Ruppe wrote: On Sunday, 3 May 2020 at 20:02:09 UTC, Marcone wrote: How can I check if an element is iterable in Dlang? http://dpldocs.info/experimental-docs/std.traits.isIterable.html I don't want to che

Re: How can I check if an element is iterable?

2020-05-03 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, May 3, 2020 2:54:17 PM MDT Marcone via Digitalmars-d-learn wrote: > On Sunday, 3 May 2020 at 20:46:30 UTC, Adam D. Ruppe wrote: > > On Sunday, 3 May 2020 at 20:21:24 UTC, Marcone wrote: > >> How can I check if a variable is iterable? > > > > Every variable has a type. You can get it with

Re: How can I check if an element is iterable?

2020-05-03 Thread Marcone via Digitalmars-d-learn
On Sunday, 3 May 2020 at 20:46:30 UTC, Adam D. Ruppe wrote: On Sunday, 3 May 2020 at 20:21:24 UTC, Marcone wrote: How can I check if a variable is iterable? Every variable has a type. You can get it with typeof(varaiable) I need in runtime.

Re: How can I check if an element is iterable?

2020-05-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 3 May 2020 at 20:21:24 UTC, Marcone wrote: How can I check if a variable is iterable? Every variable has a type. You can get it with typeof(varaiable)

Re: How can I check if an element is iterable?

2020-05-03 Thread Marcone via Digitalmars-d-learn
On Sunday, 3 May 2020 at 20:11:58 UTC, Adam D. Ruppe wrote: On Sunday, 3 May 2020 at 20:02:09 UTC, Marcone wrote: How can I check if an element is iterable in Dlang? http://dpldocs.info/experimental-docs/std.traits.isIterable.html I don't want to check if type is iterable, but if var

Re: How can I check if an element is iterable?

2020-05-03 Thread Marcone via Digitalmars-d-learn
On Sunday, 3 May 2020 at 20:11:58 UTC, Adam D. Ruppe wrote: On Sunday, 3 May 2020 at 20:02:09 UTC, Marcone wrote: How can I check if an element is iterable in Dlang? http://dpldocs.info/experimental-docs/std.traits.isIterable.html Not working. How can I check if a variable is iterable

Re: How can I check if an element is iterable?

2020-05-03 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 3 May 2020 at 20:02:09 UTC, Marcone wrote: How can I check if an element is iterable in Dlang? http://dpldocs.info/experimental-docs/std.traits.isIterable.html

How can I check if an element is iterable?

2020-05-03 Thread Marcone via Digitalmars-d-learn
How can I check if an element is iterable in Dlang?