cljs implementation of ring-buffer