by failrate · 17y ago · 0 comments
{
"x": [
{
"y": "a",
"z": 23,
"q": [
54,
32,
45
]
}
],
"r": 43
}The other difference is that there are JSON parsers and generators for more languages and they're not programmable.
(I actually prefer Python's style of using indentation to indicate blocks, but I recognize generating such code is harder than code with tokens.)
(defn sum-vec [vec] (let [vec-len (count vec)] (loop [idx 0 acc 0] (if (< idx vec-len) (recur (inc idx) (+ acc (vec idx))) acc))))