
recorded_list(+Key, ?List)

   Succeeds if the List is the list of all terms that are currently recorded
in the indexed database under the key Key.



Arguments
   +Key                An atom or a compound term.
   ?List               A (possibly empty) list of Prolog terms.

Type
   Recorded Database

Description
   Unifies List with a list of all the terms that are currently recorded
   under the key Key.  While recorded/2 returns the terms one by one on
   backtracking, recorded_list/2  gives them all at once.  The order of the
   list corresponds to the order in which the terms would be delivered by
   recorded/2.  recorded_list/2  could be defined as



    recorded_list(Key, List) :-
        findall(Term, recorded(Key, Term), List).

   In the case of compound terms, all keys of the same name and arity are
   treated as equal.




Resatisfiable
      No.

Fail Conditions
      Fails List does not unify with the list of recorded terms.



Exceptions
     4 --- Key is not instantiated.
     5 --- Key is neither an atom nor a compound term.
     5 --- List is neither an variable nor a list.

Examples
   
   Success:
   [eclipse]: erase_all(beer), recorded_list(beer,List).
   List = []
   yes.
   [eclipse]: record(beer,paulaner), record(beer,lowenbrau),
   recorda(beer,spaten), recorded_list(beer,List).
   List = [spaten, paulaner, lowenbrau]
   yes.
   Fail:
   erase_all(beer), recorded_list(beer,[paulaner]).
   Error:
   recorded_list(Beer,Value).                (Error 4)
   recorded_list(1,Value).                   (Error 5)
   recorded_list(beer,lowenbrau).            (Error 5)





See Also
   record / 2, recorded / 2
