Types
PersistentArray[shift; T] = ref object size: int root: PersistentArrayNode[shift, T] h: int
- Source Edit
PersistentArrayNode[shift; T] {.acyclic.} = ref object arr: seq[PersistentArrayNode[shift, T]] value: T
- Source Edit
Procs
proc `[]`[shift, T](PA: PersistentArray[shift, T]; index: Natural): T
- Source Edit
proc change_value[shift, T](PA: PersistentArray[shift, T]; index: Natural; value: T): PersistentArray[shift, T]
- Source Edit
proc initPersistentArray[T](v: seq[T]; shift: static int = 5): PersistentArray[ shift, T]
- Source Edit
proc toseq[shift, T](PA: PersistentArray[shift, T]): seq[T]
- Source Edit