Dokumentation zu: transpose_array(E)

HR Image


SYNOPSIS
        mixed * transpose_array(mixed *arr)

DESCRIPTION
        transpose_array(({ ({1,2,3}), ({a,b,c}) }))
                        == ({ ({1,a}), ({2,b}), ({3,c}) })

        transpose_array() applied to an alist results in an array of
        ({ key, data }) pairs, useful if you want to use sort_array()
        or filter() on the alist.

EXAMPLES
        sort_array(transpose_array(({ m_indices(map), m_values(map) })),
                   lambda(({ 'a, 'b }),
                          ({ #'<, ({ #'[, 'a, 0 }),
                                  ({ #'[, 'b, 0}) }) )

        The given mapping 'map' is returned as an array of
        ({ key, data }) pairs, sorted by the keys.

SEE ALSO
        alists(LPC), sort_array(E)

Die Seite ist auch in Deutsch vorhanden.

Start » Magierhandbuch » Docu » Efun » Transpose_array Letzte Generierung: 25.04.2021, 01:58
Email an: mud@wl.mud.de
Valid HTML 4.01!