You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
make_leaf_set (in line 776) "takes a list of symbol-frequency pairs such as list(list("A", 4), list("B", 2), list("C", 1), list("D", 1))" and not a list of leafs.
Because the argument is a list of leafs, the resulting list will look like this:
[ ["leaf", ["leaf", ["A", null]]],
[ ["leaf", ["leaf", ["B", null]]],
[["leaf", ["leaf", ["C", null]]], [["leaf", ["leaf", ["D", null]]], null]]]]
head(first_pair) (in line 766) expects a list with the first item being the symbol and the second item the frequency.
0 commit comments