Used to backtrack over the named record keys that currently have recorded terms. Key must be either a variable, an atom or a compound term. In the case of compound terms, all keys of the same name and arity are treated as equal.
Success:
[eclipse]: record(whiskey,jameson),
> record(whiskey,bushmills),
> record(beer,lowenbrau),
> record(car(bmw), 735).
yes.
[eclipse]: current_record(Key).
Key = beer More? (;)
Key = whiskey More? (;)
Key = car(_g62) More? (;)
no (more) solution.
Fail:
record(whiskey,bushmills),current_record(bushmills).
Error:
current_record(1). (Error 5)
current_record("whiskey"). (Error 5)