Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Thing is, the general idea here is that nodes do not necessarily have to hold any values, and if they do, the values do not necessarily have to be unique. The important part is identity of nodes. The image does not mean to show that nodes hold values, and in many languages they don't. All what is needed to solve this problem is check of "is this node the same node as the other node" which is easy to do in languages with references, but in Haskell, translator decided to go with an implementation of
Eq
for nodes backed by an internal, non-public, and deliberately undocumented identifier. All what you can do, and all what is actually needed to solve the task, isnode1 == node2
, which returnsTrue
ifnode1
andnode2
hold the same node, andFalse
if not.I do not know if it is a good, idiomatic approach for Haskell. It might be, or might be not, no idea. But the idea is that all you need to know to solve the task is equality of nodes, and not values held by the nodes.
I'm sorry for your time, but I'm also glad you liked it. :)