Update doc/efun/ aus Driversourcen.
Manpages der efuns aktualisiert, neue Manpages hinzugefuegt.
Change-Id: I7cc91684269ff56d1aef47d5c5e7c87f7fd531dc
diff --git a/doc/efun/unique_array b/doc/efun/unique_array
index 72da0b0..b1c649c 100644
--- a/doc/efun/unique_array
+++ b/doc/efun/unique_array
@@ -1,47 +1,48 @@
SYNOPSIS
- <object|lwobject>** unique_array(<object|lwobject> *obj
- , string|closure fun)
- <object|lwobject>** unique_array(<object|lwobject> *obj
- , string|closure fun, mixed skip)
- <object|lwobject>** unique_array(<object|lwobject> *obj
- , string|closure fun, mixed extra...
- , mixed skip)
+ <object|lwobject>** unique_array(<object|lwobject> *obarr
+ , string|closure fun)
+ <object|lwobject>** unique_array(<object|lwobject> *obarr
+ , string|closure fun, mixed skip)
+ <object|lwobject>** unique_array(<object|lwobject> *obarr
+ , string|closure fun, mixed extra...
+ , mixed skip)
-BESCHREIBUNG
- Gruppiert alle Objekte aus <*obj>, fuer die die Funktion <fun>
- den gleichen Wert liefert. Wenn <*obj> etwas anderes als Objekte
- enthaelt, werden diese ignoriert.
+DESCRIPTION
+ Groups objects together for which the separator function returns the
+ same value. obarr should be an array of objects, other types are
+ ignored.
- Ist die Funktion mit Namen angegeben, wird sie in jedem Objekt
- in <*obj> einmal aufgerufen. Wurden <extra> Argumente
- gegeben, werden diese an die Funktion bei jedem Aufruf als
- Parameter uebergeben.
-
- Ist die Funktion als Closure angegeben, wird sie fuer jedes Objekt
- in <*obj> einmal aufgerufen, wobei das Objekt als erstes Argument
- uebergeben wird, gefolgt von etwaiigen <extra> Argumenten.
-
- Wird ein Argument <skip> angegeben (bei Verwendung von <extra>
- Argumenten muss dies geschehen), und entspricht <skip> dem
- Resultat von <separator> fuer ein Element aus <*obj>, so wird
- dieses Element nicht in das Resultat von unique_array()
- uebernommen.
+ If the separator function is defined by name, it is searched and
+ called in the objects from <obarr>. If <extra> arguments are given,
+ they are passed to the function as arguments.
- Das Resultat von unique_array() hat die Form:
+ If the separator function is defined as a closure, it will be passed
+ the objects from <obarr> as first argument, with the <extra> arguments
+ (if any) passed following.
+
+ If the <skip> argument is given (it is required when <extra> arguments
+ are to be used), and the return value from the separator function call
+ matches this value, the object in question will _not_ be included in
+ the returned array. Default value for <skip> is the number 0.
- ({ ({same1:1, same1:2, ... same1:n}),
- ({same2:1, same2:2, ... same2:n}),
- ({samem:1, samem:2, ... samem:n}) })
+ The returned array is an array of arrays of objects in the form:
-BEISPIELE
- Um ein Array von Arrays zu erhalten, das alle Benutzer, nach Level
- gruppiert, enthaelt:
+ ({ ({ Same1:1, Same1:2, ... Same1:N }),
+ ({ Same2:1, Same2:2, ... Same2:N }),
+ ....
+ ({ SameM:1, SameM:2, ... SameM:N }) })
- mixed *arr;
- arr = unique_array(users(), "_query_level", -1);
+EXAMPLES
+ mixed *arr;
+ arr=unique_array(users(), "_query_level", -1);
- Goetter haben einen Level von -1. Sie werden nicht in arr aufgenommen,
- weil <skip> == -1.
+ This will return an array of arrays holding all user objects
+ grouped together by their user levels. Wizards have a user
+ level of -1 so they will not appear in the the returned array.
-SIEHE AUCH
+HISTORY
+ LDMud 3.3 added the possibility to call closures, and to
+ pass extra arguments to the separator function.
+
+SEE ALSO
filter(E), map(E)