--- /dev/null
+:- [diagnosis].\r
+\r
+isHittingSetTree(Tree) :-\r
+ isHittingSetTree2(Tree, []). %function to add variable for uniqueness checking\r
+\r
+isHittingSetTree2(leaf, _). %when end of branch has been reached\r
+isHittingSetTree2(node([], []), _). %when a node turns empty\r
+isHittingSetTree2(node([X|Xs], [Y|Ys]), Z) :-\r
+ not(member(X,Z)), %check if label has already been used up in the tree\r
+ append(Z, [X], Appended), %append label to list of checked labels\r
+ isHittingSetTree2(Y, Appended), %go into depth\r
+ isHittingSetTree2(node(Xs, Ys), Z). %go into width\r
+
\ No newline at end of file