Om.Next is an excellent and clean UI library for use with Clojure and Clojurescript and I'm trying to add functionality for commenting to our website.
Essentially: entities have a bid (blurb-id) and now I want to add comments.
My idea is:
entities get a :cid (comment-id) and also they have the attributes :root_bid and :parent_cid
So every comment looks like:
{:cid 676767
:root_bid 5252
:parent_cid 676765
:contents "this is a comment"
:author "this@email.com"
:total-score 70
:number-of-votes 1 }
And that's basically everything I need to be able to store a comment.
So far so good, but now I want to recursively render comments, Fred comments on Jane's blurb, Jesus comments on Fred's comment, Josephine comments on Jesus' comment...
How can I recursively map comments using this datastructure?
I'm stumped so I appreciate any help.