Arc Forumnew | comments | leaders | submitlogin
1 point by Pauan 4463 days ago | link | parent

Also, I got the binary search tree code ported over to JS. It's looking quite nice, and it's mostly partitioned off so you can use it by itself in JS, without using the rest of Nulan:

https://github.com/Pauan/nulan/blob/master/Tree.js

You can just open up Chrome's JavaScript Console and paste in the code (https://raw.github.com/Pauan/nulan/master/Tree.js)

Now try it out like this:

  var x = NULAN.toTree({ foo: "bar", qux: "corge" })
  console.log("" + x)
  console.log(x.get("foo"))
  console.log("" + x.set("nou", "yes"))
  console.log("" + x)