soniakeys / vlist

VList data structure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VList

A VList is an ordered list data structure.

See http://en.wikipedia.org/wiki/VList, or http://infoscience.epfl.ch/record/64410/files/techlists.pdf, "Fast Functional Lists, Hash-Lists, Deques and Variable Length Arrays", Phil Bagwell.

This is a simple example, originally written for Rosetta Code. It could be built upon in various ways, for example:

  • A copy function.
  • Go-like slicing and appending.
  • More Lisp-like functions.
  • More efficient representation. Probably with the unsafe package, ideas from the Bagwell paper could be implemented.

About

VList data structure


Languages

Language:Go 100.0%