package
1.4.0
Repository: https://codeberg.org/anaseto/goal.git
Documentation: pkg.go.dev

# README

The main.go file gives an example of how to extend the default interpreter with new builtins. The current example provides builtins handling a simple minheap-based mutable priority queue. Note that it's just provided as an example and so may be updated (it is not part of stable API), so you may want to work on a local copy if you plan on using it for anything serious.

It can be build and installed in a similar way as the default interpreter using either go build or go install in this directory.

Exported:

heapq.new()        / initialize and return new priority queue
heapq.push[pq;x;i] / push x with integer piority i
heapq.pop[pq]      / remove and return lowest priority item
heapq.pop2[pq]     / remove and return lowest priority item and priority
heapq.len[pq]      / number of elements in the queue