lib(lists_of_structures)


    This library contains predicates that operate on lists of structures,
    in particular structures where one argument can be considered a `key'.
    Such lists are very common, and often occur in sorted form.
    
    The ECLiPSe kernel and other libraries support such lists as well, e.g.

    the sorting built-ins (sort/4, merge/5)
    hash:list_to_hash/4 for turning such lists into hash tables

    
    If you have declared your structures using the
    :- local(struct(...)) declaration, then you can use field names to
    identify the key arguments in all these predicates, e.g.

    :- local struct(emp(name,age,salary)).

    ?- Emps = [emp{name:joe,salary:100}, emp{name:bob,salary:200}],
       sort(salary of emp, >=, Emps, Descending),
       args(name of emp, Descending, Names).

    Emps = [emp(joe, _, 100), emp(bob, _, 200)]
    Descending = [emp(bob, _, 200), emp(joe, _, 100)]
    Names = [bob, joe]
    yes



