This commit is contained in:
2026-06-03 19:28:55 -07:00
parent 4e54bebeba
commit e180dc955d
2 changed files with 34 additions and 20 deletions
+5 -2
View File
@@ -51,7 +51,6 @@
%% API: functions
%%=====================================================
-spec nstem(Root, Forest) -> Tree when
Root :: S,
Forest :: nforest(S, L),
@@ -67,6 +66,7 @@ meta(#ns{meta = M}) -> M.
kids(#ns{kids = K}) -> K.
-spec flatten_tree(Tree) -> Leafs when
Tree :: ntree(_, L),
Leafs :: [L],
@@ -76,6 +76,7 @@ flatten_tree(T) ->
lists:flatten(ft(T)).
-spec flatten_forest(Forest) -> Leafs when
Forest :: nforest(_, L),
Leafs :: [L],
@@ -88,4 +89,6 @@ flatten_forest(F) ->
ft(#ns{kids = F}) -> ff(F);
ft(Leaf) -> [Leaf].
ff(F) -> [ft(T) || T <- F].
ff(F) ->
[ft(T) || T <- F].