Skip to content

Instantly share code, notes, and snippets.

@flyx
Created February 29, 2012 18:44
Show Gist options
  • Save flyx/1943436 to your computer and use it in GitHub Desktop.
Save flyx/1943436 to your computer and use it in GitHub Desktop.
generic
-- defines maximum depth of tree
type Node_Level is <>;
package Tree is
-- it's a binary tree. for now.
type Tree_Direction is (Left, Right);
type Direction_Array is array (Node_Level range <>) of Tree_Direction;
type Path_To_Node (Depth : Node_Level) is record
Directions : Direction_Array (Node_Level'First .. Depth'Pred);
end record;
-- .. somewhere here, the actual Tree structure is defined
end Tree;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment