Example of a Maple Package - Maple Programming Help

Home : Support : Online Help : Applications and Example Worksheets : Language and System : examples/binarytree

Example of a Maple Package

This example briefly introduces all of the concepts required to add your own package to Maple. In particular, the following topics are covered:

 • using unevaluated function calls to represent data structures
 • customizing the printing of data structures represented with function calls
 • creating the package module
 • updating the help system

To demonstrate these techniques, we will construct a Maple implementation of a simple dictionary structure that uses binary trees. This structure allows the insertion, deletion, and lookup of numeric keys and associated values. It could easily be extended to allow range queries (find all entries where the key is between a and b), or to print the sorted list of values.

 > restart;