Skip to content

Instantly share code, notes, and snippets.

Neeraj Kashyap nkashy1

View GitHub Profile
@nkashy1
nkashy1 / anchor.md
Last active Jun 19, 2017
Markdown anchors
View anchor.md

OMG

WTF

BBQ

(Scroll all the way down beyond the wall of text)

(Wall of text generated by randomtextgenerator)

Necessary ye contented newspaper zealously breakfast he prevailed. Melancholy middletons yet understood decisively boy law she. Answer him easily are its barton little. Oh no though mother be things simple itself. Dashwood horrible he strictly on as. Home fine in so am good body this hope.

View clojure-tree-descendant-counting
(def test-tree {1 {:root nil} 2 {:root 1} 3 {:root 1} 4 {:root 2} 5 {:root 1} 6 {:root 4}})
(defn path-to-top [tree v]
(if (nil? v)
'()
(cons v (path-to-top tree (:root (get tree v))))))
(defn steps-indexed-path
([upward-path steps]
(if (= upward-path '())
You can’t perform that action at this time.