I am trying to create a zipper from a map of my own. According to zipper definition,
Usage: (zipper branch? children make-node root)
the parameters branch? and children are clear and i am able to define it. But the make-node function is confusing. I gave an implementation to it which i dont think is being used.
I have a map of
{:question "Question 1" :yes "Answer1"
:no {:question "Question 2"
:yes "Answer2"
:no "Answer3"}}
I want build a zipper from this map. So i used the following zipper function call,
(zip/zipper map?
(fn [node] [(:yes node) (:no node)])
(fn [node children] (:question node))
question-bank)
This works fine. It works even if give the make-node parameter nil. I dont understand when and where is this parameter will be used.