News for hackers. Stuff that matters.
Re:Why it’s hard for programmers to write a program to flatt... by dllthomas on Friday February 24, 2017 @02:28PM (#13726847)
Also not a Java programmer, but my approach would probably involve two classes implementing the nested list interface. One would hold a list, the other an integer (or maybe parameterize over that, depending on the context).

Drawing analogy to lisp, we need to be able to answer "is this a list or an atom?"

Note that the actual structure involved is "really" a rose tree.

There are no comments on this comment yet.