Dear all,

I am attempting to recover trees from a varying length path encoding. Chapter
32: Trees <https://www.jsoftware.com/help/learning/32.htm> shows how to do
it for fixed-length paths, but I wasn't able to find a suitable solution to
the varying length case. To illustrate:

leaves =. 'g';1
paths =. (,0);1 0
tree =. paths mktree leaves
tree -: 'g';<<1
1

What would be the definition of 'mktree'? Is there a "common idiom" APL
solution to that?

Thanks a bunch,
Raoul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to