State >>
 Items : Array | List
 Step : Integer
;

Report >>
 Key, Record : Arg
 Step : Integer
 Continue : 1 | 0
 Ext : < State : Record >
;

Data >>
 Rq : Arg
 Key, Record : Arg
 Value : Arg
 Step : Integer
 Precision : Float | Const
;

Enumerate ->
Arg Items : Array | List, Rq : Arg, Pc : Float | Const, T : ^&Record,
    Value : < Arg, &Arg >, Store : < Arg, Integer >, Match : < Data, ^&Report >

Let Items, ERR_NO_DATA

En : State = < Items : Items, Step : 0 > ..
R : Report = < Ext.State = T, Continue : 1 > ..

Call Enumerate 'En' R Value ( K, H, V, S : 
                                           Call Match <
                                                        Rq : Rq,
                                                        Key : K, Record : H,
                                                        Value : V, Step : S,
                                                        Precision : Pc
                                                      > 'R'
                            ),
     Store R.Record R.Step R.Key

Return

/* * */

Enumerate Enumerate : -c ->
Arg En : ^&State, R : Report,
    Value : < Arg, &Arg >,
    Deliver : < Arg, Arg, Integer >

Detach En.Items Key, Record _

En.Step ++

Call Value Record 'V',
     Deliver Key Record V En.Step

If Next( R, En.Items ) then
 Call Enumerate *
Else
 Return

/* * */

Next Enumerate Enumerate ->
Arg R : Report, Items : Array | List

When !R.Continue then
Return 0

When !Items then
Return 0

Else
Return 1
