From 06b931fa60f5038b2ece5cf8257b07e3925d8ae8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 10 Sep 2018 02:51:06 +0200 Subject: lists.ads: add comments. --- src/lists.ads | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lists.ads b/src/lists.ads index efb7a21ea..bf9512a73 100644 --- a/src/lists.ads +++ b/src/lists.ads @@ -72,12 +72,13 @@ package Lists is -- Must be used to free the memory used by the lists. procedure Initialize; - -- Append ELEMENT to the list. + -- Append ELEMENT to the list. It's an O(1) operation. procedure Append_Element (List : List_Type; Element : Node_Type); -- Return the first element of the list. function Get_First_Element (List : List_Type) return Node_Type; + -- Append EL if not already in LIST. It's an O(n) operation. procedure Add_Element (List : List_Type; El : Node_Type); -- Return the number of elements in the list. -- cgit v1.2.3