# Method Program.all_inherits()

Method all_inherits

  ``array`(`program`) all_inherits(`program` `p`)`

Description

  Enumerate all programs this program inherits, directly or indirectly. Similar to inherit_tree() but returns a flat array.

Example

      > class a{}
        > class b{}
        > class c{ inherit a; }
        > class d{ inherit b; inherit c; }
        > Program.inherit_tree(d);
        Result: ({ /* 3 elements */
                    b,
                    c,
                    a
                })