I see, thanks.
On Monday, 9 June 2014 at 10:01:25 UTC, Philippe Sigaud via
Digitalmars-d wrote:
struct / class Element(T) {
T name;
T[T] attributes;
// ...
string toString() {
return ...;
}
}
Why did you chose the same type for keys and values? And
shouldn't
'name' always be a string?
For a
> struct / class Element(T) {
> T name;
> T[T] attributes;
> // ...
> string toString() {
> return ...;
> }
> }
Why did you chose the same type for keys and values? And shouldn't
'name' always be a string?
On Saturday, 7 June 2014 at 06:48:39 UTC, Philippe Sigaud wrote:
I was watching Chuck Allison talk yesterday, and wondered what
could be a possible homework in D. Maybe other people here have
some ideas, maybe Bearophile will point to RosettaCode, I don't
know. But here is a possible idea:
Tr
Yes indeed, you can provide a range interface on a tree. That's a good idea!
But I suppose Chuck wants to teach his students generic notions such as
mapping or folding. Ranges are more a D-specific thing.
Also, what's interesting is that when mapping a tree, you can keep its
'shape', whereas pro
The good exercise would be implementing some traversal (walk)
algorithms for the generic tree structures. There are many tree
traversal algorithms (some kinds of depth search and
breadth-first search) and they may have range interface, so you
can use them just like other ranges and don't need t
On Saturday, 7 June 2014 at 17:45:46 UTC, Philippe Sigaud via
Digitalmars-d wrote:
I will. I just wanted to see what other ideas people here could
find.
And I'm really glad that you did here, because as a D learner it
will be nice to see those ideas.
Matheus.
On Sat, Jun 7, 2014 at 5:00 PM, MattCoder via Digitalmars-d
wrote:
> Yes this is interesting idead. -But If I remember well, he said to send him
> an e-mail with ideas. So I think you should point him (through e-mail) about
> this topic!
I will. I just wanted to see what other ideas people here
On Saturday, 7 June 2014 at 06:48:39 UTC, Philippe Sigaud wrote:
I was watching Chuck Allison talk yesterday, and wondered what
could be a possible homework in D. Maybe other people here have
some ideas, maybe Bearophile will point to RosettaCode, I don't
know.
Thoughts? Do other people here
On Saturday, 7 June 2014 at 06:48:39 UTC, Philippe Sigaud wrote:
... But here is a possible idea:
Trees...
...Thoughts? Do other people here have homework ideas?
Yes this is interesting idead. -But If I remember well, he said
to send him an e-mail with ideas. So I think you should point him
(
I was watching Chuck Allison talk yesterday, and wondered what
could be a possible homework in D. Maybe other people here have
some ideas, maybe Bearophile will point to RosettaCode, I don't
know. But here is a possible idea:
Trees.
Since you taught them about ranges/lists and functional
map
11 matches
Mail list logo