I do stuff like map some xml and get a list of generated case classes. So all good. But then I want to insert them into a PACKAGE, and I can't because I have a List[treehugger.forest.ClassDef] and it wants a tree. How to I coerce a list of trees into a tree?
Along the same lines, sometimes I'm working in a BLOCK() and I want to added a function only if a field is present in the XML. example :
BLOCK(
)
where "something" is a bunch of case classes that were populated from some xml document.
There doesn't seem to be a way to optional put something into a BLOCK.
I'm sure that's not the case, I'm sure that it's that I don't understand how trees/forests work and how to manipulate them in a non-static fashion .
All the documentation (which is great BTW) is all static creation of stuff, AFAICT
Sorry in advance if this is a really stupid question.
-Jon