d:`opbpj`fnadb`hadmc`jjjoa`aglag!(`opbpj`fnadb;`fnadb`hadmc;`hadmc`jjjoa;`jjjoa`aglag;`aglag`)d2:`opbpj`fnadb`hadmc`jjjoa`aglag!(`fnadb;`hadmc;`jjjoa;`aglag;`){x, raze {[y] l:();while[not null y;y:d2[y];l,:y];:l}each -1#x}each dOn Oct 11, 12:13�pm, Daniel
wrote:> I have two dictionaries.>> The first has a key of a symbol and value a list of symbols being> itself plus its related parent.>> i.e>> opbpj| opbpj fnadb> fnadb| fnadb hadmc> hadmc| hadmc jjjoa> jjjoa| jjjoa aglag> aglag| aglag `>> The second is a dictionary linking symbols with their related parent.>> opbpj| fnadb> fnadb| hadmc> hadmc| jjjoa> jjjoa| aglag> aglag| `>> I want to take the last item in the each of the items in the first> dictionary and append its parent if it has one.> After appending the parent I also want to check if that also has a> parent and append that.>> Result of>> opbpj| opbpj fnadb hadmc jjjoa aglag `> fnadb| fnadb hadmc jjjoa aglag `> hadmc| hadmc jjjoa aglag `> jjjoa| jjjoa aglag `> aglag| aglag `>> In this example they are in order but thats not an assumption I can> make.>> Any advice would be appreciated.>> Thanks,> Daniel
-Ajay