// k4 t:(+(,`n)!,!10)!+(`p`d!(0 0 0 2 2 2 4 4 7 7;10?100)) / tree (as key table) t:![t;,(in;`n;`p);0b;(,`d)!,0N] / null out non-leaves f:50< / predicate s:?[t;,(in;`n;?,/(. t[;`p])\'?[t;,(f;`d);();`n]);0b;()] / select subtree \ q)s n| p d -| ---- 0| 0 1| 0 67 2| 0 3| 2 73 4| 2 6| 4 53 7| 4 8| 7 83