===== help $command_utils ==========================
Generic Utilities Package (#56):
----

Generic Utilities Package (#56) [ readable ]
	Owned by ScarFace (#2).
		Child of Generic Utilities Package (#79).
  
#56:do_huh                       #56:do_huh(old)                #56:dump_lines
#56:explain_syntax               #56:init_for_core              #56:object_match_failed
#56:"player_match_result player_match_failed"                   #56:read
#56:read_lines                   #56:read_lines_escape          #56:running_out_of_time
#56:suspend                      #56:suspend_database_add       #56:suspend_database_cleanup
#56:suspend_database_display     #56:suspend_database_info      #56:suspend_database_remove
#56:suspend_if_needed            #56:task_info                  #56:yes_or_no
$command_utils is the repository for verbs that are of general usefulness to authors of all sorts of commands. For more details about any of these verbs, use `help $command_utils:<verb-name>'.

Detecting and Handling Failures in Matching
-------------------------------------------

:object_match_failed(match_result, name)
	Test whether or not a :match_object() call failed and print messages if so.
:player_match_failed(match_result, name)
	Test whether or not a :match_player() call failed and print messages if so.
:player_match_result(match_results, names)
	...similar to :player_match_failed, but does a whole list at once.
Reading Input from the Player
-----------------------------
:read()              -- Read one line of input from the player and return it.
:yes_or_no([prompt]) -- Prompt for and read a `yes' or `no' answer.
:read_lines()        -- Read zero or more lines of input from the player.
:dump_lines(lines)   -- Return list of lines quoted so that feeding them to 
:read_lines()        -- will reproduce the original lines.
Utilities for Suspending
------------------------
:running_out_of_time()    -- Return true if we're low on ticks or seconds.
:suspend_if_needed(time)  -- Suspend (and return true) if we're running out of time.
Client Support for Lengthy Commands
-----------------------------------

:suspend(args) -- Handle PREFIX and SUFFIX for clients in long commands.


help #56:do_huh Information about Generic Utilities Package(#56):do_huh
----
:do_huh(verb,args) what :huh should do by default.
help #56:do_huh(old) Information about Generic Utilities Package(#56):do_huh(old)
----
Copied from Generic Utilities Package (#56):do_huh by ScarFace (#2) Mon Jul 7 11:04:21 1997 EST
:do_huh(verb,args) what :huh should do by default.
help #56:dump_lines Information about Generic Utilities Package(#56):dump_lines
----
:dump_lines(text) => text `.'-quoted for :read_lines() text is assumed to be a list of strings Returns a corresponding list of strings which, when read via :read_lines, produces the original list of strings (essentially, any strings beginning with a period "." have the period doubled). The list returned includes a final "."
help #56:explain_syntax Information about Generic Utilities Package(#56):explain_syntax
----
:explain_syntax(here,verb,args)
help #56:object_match_failed Information about Generic Utilities Package(#56):object_match_failed
----
Usage: object_match_failed(object, string)
Prints a message if string does not match object. Generally used after object is derived from a :match_object(string).
help #56:player_match_result Information about Generic Utilities Package(#56):player_match_result/player_match_failed
----
:player_match_failed(result,string)
is exactly like :object_match_failed(result,string) except that its messages are more suitable for player searches.
:player_match_result(results,strings) handles a list of results, also presumably from $string_utils:match_player(strings), printing messages to player for *each* of the nonmatching strings. It returns a list, an overall result (true if some string didn't match --- just like player_match_failed), followed by the list players that matched.

An optional 3rd arg gives an identifying string to prefix to each of the nasty messages.


help #56:read Information about Generic Utilities Package(#56):read
----
$command_utils:read() -- read a line of input from the player and return it. Optional argument is a prompt portion to replace `a line of input' in the prompt.

Returns E_PERM if the current task is not a command task that has never called suspend().
========== Alterado para aceitar clientes java ==============


help #56:read_lines Information about Generic Utilities Package(#56):read_lines
----
$command_utils:read_lines([max]) -- read zero or more lines of input

Returns a list of strings, the (up to MAX, if given) lines typed by the player. Returns E_PERM if the current task is not a command task that has never called suspend().
In order that one may enter arbitrary lines, including "@abort" or ".", if the first character in an input line is `.' and there is some nonwhitespace afterwords, the `.' is dropped and the rest of the line is taken verbatim, so that, e.g., ".@abort" enters as "@abort" and ".." enters as ".".


help #56:read_lines_escape Information about Generic Utilities Package(#56):read_lines_escape
----
$command_utils:read_lines_escape(escapes[,help]) -- read zero or more lines of input

Similar to :read_lines() except that help is available and one may specify other escape sequences to terminate the read. escapes should be either a string or list of strings; this specifies which inputs other from `.' or `@abort' should terminate the read (... don't use anything beginning with a `.'). help should be a string or list of strings to be printed in response to the player typing `?'; the first line of the help text should be a general comment about what the input text should be used for.

Successive lines should describe the effects of the alternative escapes.
Returns {end,list-of-strings-input} where end is the particular line that terminated this input or 0 if input terminated normally with `.'. Returns E_PERM if the current task is not a command task that has never called suspend().
@abort and lines beginning with `.' are treated exactly as with :read_lines()


help #56:running_out_of_time Information about Generic Utilities Package(#56):running_out_of_time
----
Return true if we're running out of ticks or seconds.
help #56:suspend Information about Generic Utilities Package(#56):suspend
----
Suspend, using output_delimiters() in case a client needs to keep track of the output of the current command.
Args are TIME, amount of time to suspend, and optional (misnamed) OUTPUT. If given no OUTPUT, just do a suspend.
If OUTPUT is neither list nor string, suspend and return output_delimiters If OUTPUT is a list, it should be in the output_delimiters() format:
{PREFIX, SUFFIX}. Use these to handle that client stuff. If OUTPUT is a string, it should be SUFFIX (output_delimiters[2])

Proper usage:
The first time you want to suspend, use output_delimiters = $command_utils:suspend(time, x); where x is some non-zero number. Following, use $command_utils:suspend(time, output_delimiters);
To wrap things up, use $command_utils:suspend(time, output_delimiters[2]);

You'll probably want time == 0 most of the time.
Note: Using this from verbs called by other verbs could get pretty weird.


help #56:suspend_database_info Information about Generic Utilities Package(#56):suspend_database_info
----
$command_utils:suspend_database_info(task_id, fast) => Returns callers list of $command_utils:suspend_if_needed() call with given task_id.
Caller_perms() must be a Wizard or the owner of the task. Returns {} if no task. Give 'fast' if you don't care about accuracy
WIZARDLY
help #56:suspend_if_needed Information about Generic Utilities Package(#56):suspend_if_needed
----
Usage: $command_utils:suspend_if_needed(<time>[, @<announcement>])
See if we're running out of ticks or seconds, and if so suspend(<time>) and return true. If more than one arg is given, print the remainder with player:tell.
help #56:task_info Information about Generic Utilities Package(#56):task_info
----
task_info(task id)
Return info (the same info supplied by queued_tasks()) about a given task id, or E_INVARG if there's no such task queued.
WIZARDLY
help #56:yes_or_no Information about Generic Utilities Package(#56):yes_or_no
----
:yes-or-no([prompt]) -- prompts the player for a yes or no answer and returns a true value iff the player enters a line of input that is some prefix of "yes"

Returns E_NONE if the player enters a blank line, E_INVARG, if the player enters something that isn't a prefix of "yes" or "no", and E_PERM if the current task is not a command task that has never called suspend().

G

===== help $gender_utils ============================
Gender_Utilities (#41):
----

Gender_Utilities (#41) [ readable ]
	Owned by Hacker (#37).
		Child of Generic Utilities Package (#79).
  
#41:add                 #41:_do                 #41:get_conj*ugation
#41:get_pronoun         #41:pronoun_sub         #41:set
#41:_verb_plural        #41:_verb_singular
Defines the list of standard genders, the default pronouns for each, and routines for adding or setting pronoun properties on any gendered object.
Properties:
  .genders  -- list of standard genders
  .pronouns -- list of pronoun properties
  .ps .po .pp .pq .pr .psc .poc .ppc .pqc .prc 
            -- lists of pronouns for each of the standard genders

  If foo is of gender this.gender[n], then the default pronoun foo.p is
this.p[n] (where p is one of ps/po/pp/pq...)

Verbs:
  :set(object,newgender)             -- changes pronoun properties to match new gender.
  :add(object[,perms[,owner]])       -- adds pronoun properties to object.

  :get_pronoun     (which,object)    -- return pronoun for a given object
  :get_conj*ugation(verbspec,object) -- return appropriately conjugated verb

help #41:add Information about Gender_Utilities(#41):add
----
$gender_utils:add(object[,perms[,owner]])
--- adds pronoun properties to object if they're not already there.
perms default to "rc", owner defaults to the object owner.
help #41:_do Information about Gender_Utilities(#41):_do
----
_do(cap,object,modifiers...)
help #41:get_conjugation Information about Gender_Utilities(#41):get_conj*ugation
----
get_conj(verbspec,object) => verb conjugated according to object.
verbspec can be one of "singular/plural", "singular", "singular/", or "/plural", e.g., "is/are", "is", "is/", or "/are".
The object is checked to see whether it is singular or plural. This is inferred from its .gender property. If .gender doesn't exist or the object itself is invalid, we assume singular.
help #41:get_pronoun Information about Gender_Utilities(#41):get_pronoun
----
get_pronoun(key,object) => pronoun corresponding to object. key can be one of s,o,p,q,r,S,O,P,Q,R to refer to the pronoun properties relatively directly or it can be something of the form "he/she" or "He/She".
Next the object is checked for the desired pronoun property. If that doesn't exist, we look at object.gender and infer the pronoun from the corresponding $gender_utils property. If .gender doesn't exist or the object itself is invalid, we use the corresponding property on $player.
help #41:pronoun_sub Information about Gender_Utilities(#41):pronoun_sub
----
Experimental pronoun substitution. The official version is on $string_utils.
syntax: :pronoun_sub(text[,who])
experimental version that accomodates Aladdin's style...
help #41:set Information about Gender_Utilities(#41):set
----
$gender_utils:set(object,gender) --- sets the pronoun properties of object. gender is a string: one of the strings in $gender_utils.genders, the list of recognized genders. If the gender change is successful, the (full) name of the gender (e.g., "male") is returned. E_NONE is returned if gender does not match any recognized gender. Any other error encountered (e.g., E_PERM, E_PROPNF) is likewise returned and the object's pronoun properties are left unaltered.

===== help $ghblu_utils ============================
ghblu (#14):
----

Generic BigList Utilities
----------------------------

ghblu (#14) [ readable fertile ]
	Owned by Hacker (#37).
		Child of Generic Utilities Package (#79).
#14:25 ** unreadable **#14:debug #14:delete_range
#14:_extract#14:extract_range #14:find_nth
#14:_find_nth#14:find_ord #14:_find_ord
#14:"insert_after insert_before" #14:_insertfirst#14:insert_last
#14:keep_range#14:kill #14:length
#14:_listfind_nth#14:_merge #14:next
#14:_rmerge#14:_scrunch #14:set_nth
#14:_set_nth#14:_skill #14:_smerge
#14:_split#14:start

This is a package for maintaining huge persistent (sorted) lists in a format that is less likely to spam the server (which runs into a certain amount of trouble dealing with long ordinary lists --- btw we use `biglist' to refer to the huge data structure we're about to describe and `list' to refer to ordinary MOO lists {...}). The biglist in question lives on a particular object, to which we will refer in the discussion below as the `home' object, and its various elements appear as leaves of a tree whose nodes are kept in properties of the home object. It should be noted that the home object does not need to be (and in fact should *not* be) a descendant of this one; this object merely provides utilities for manipulating the properties on the home object that are used in a particular biglist manipulation.

All of the utilities below refer to `caller' to locate the home object. Thus verbs to manipulate a given biglist must be located on or inherited by its home object itself. The home object needs to define the following verbs

  :_make(@args)     => new property on home object with value args
  :_kill(prop)      delete a given property that was created by :_make
  :_get(prop)       => home.prop
  :_put(prop,@args) set home.prop = args
  :_ord(element)    given something that is of the form of a biglist element
                    return the corresponding ordinal (for sorting purposes).
If you never intend to use :find_ord, then this can be a routine that always returns 0 or some other random value.

See #5546 (Generic Biglist Resident) or $big_mail_recipient for examples.

Those of the following routines that take a biglist argument are expecting either {} (empty biglist) or some biglist returned by one of the other routines

  :length(biglist)          => length(biglist) (i.e., number of elements)
  :find_nth(biglist,n)      => biglist[n]
  :find_ord(biglist,k,comp) => n where n is the largest such that
                    home:(comp)(k,home:_ord(biglist[n])) is false, or the smallest such that
                    home:(comp)(k,home:_ord(biglist[n+1])) is true.
Always returns a value between 0 and length(biglist) inclusive.
This assumes biglist to be sorted in order of increasing :_ord values with respect to home:(comp)().
Standard situation is :_ord returns a number and comp is a < verb.
  :start(biglist,s,e)  => {biglist[s..?],@handle} or {}
  :next(@handle)       => {biglist[?+1..??],@newhandle} or {}
These two are used for iterating over a range of elements of a biglist
The canonical incantation for doing
        for elt in (biglist[first..last])
          ...
        endfor
     is
        handle = :start(biglist,first,last);
        while(handle)
          for elt in (handle[1])
            ...
          endfor
          handle = :next(@listdelete(handle,1));
        endwhile
The following all destructively modify their biglist argument(s) L (and M).
  :set_nth(L,n,value)      =>  L[n] = value
     replaces the indicated element
	 
  :insert_before(L,M,n)    => {@L[1..n-1],@M,@L[n..length(L)]}
  :insert_after (L,M,n)    => {@L[1..n],  @M,@L[n+1..length(L)]}
takes two distinct biglists, inserts one into the other at the given point returns the resulting consolidated biglist
  :extract_range(L,m,n) => {{@L[1..m-1],@L[n+1..]}, L[m..n]} 
     breaks the given biglist into two distinct biglists.

  :delete_range(L,m,n[,leafkiller]) => {@L[1..m-1],@L[n+1..]}
  :keep_range  (L,m,n[,leafkiller]) => L[m..n]
     like extract_range only we destroy what we don't want.

  :insertlast(L,value)  => {@L,value}
     inserts a new element at the end of biglist.
If find_ord is to continue to work properly, it is assumed that the home:_ord(elt) is greater (comp-wise) than all of the :_ord values of elements currently in the biglist.
  :kill(L[,leafkiller]) 
     destroys all nodes used by biglist.  
     Calls home:leafkiller on each element.

help #14:delete_range Information about ghblu(#14):delete_range
----
:delete_range(tree,first,last[,leafkill]) => newtree
help #14:_extract Information about ghblu(#14):_extract
----
:_extract(home,tree,first,last) => {newtree,extraction}
help #14:extract_range Information about ghblu(#14):extract_range
----
:extract_range(tree,first,last) => {newtree,extraction}
help #14:find_nth Information about ghblu(#14):find_nth
----
:find_nth(tree,n) => nth leaf of tree.
Assumes n in [1..tree[2]]
help #14:_find_nth Information about ghblu(#14):_find_nth
----
:_find_nth(home,tree,n) => nth leaf of tree.
...Assumes n in [1..tree[2]]
help #14:find_ord Information about ghblu(#14):find_ord
----
:_find_ord(tree,n,comp)
=> index of rightmost leaf for which :(comp)(n,:_ord(leaf)) is false. returns 0 if true for all leaves.
help #14:_find_ord Information about ghblu(#14):_find_ord
----
:_find_ord(home,tree,n,comp)
=> index of rightmost leaf for which :(comp)(n,:_ord(leaf)) is false. returns 0 if true for all leaves.
help #14:insert_after Information about ghblu(#14):insert_after/insert_before
----
:insert_after(tree,subtree,n)
:insert_before(tree,subtree,n)
inserts subtree after (before) the nth leaf of tree, returning the resulting tree.
help #14:insert_last Information about ghblu(#14):insert_last
----
:insert_last(tree,insert) => newtree
insert a new leaf to be inserted at the righthand end of the tree
help #14:keep_range Information about ghblu(#14):keep_range
----
:keep_range(tree,first,last[,leafkill]) => range
help #14:kill Information about ghblu(#14):kill
----
:kill(tree[,leafverb]) deletes tree and _kills all of the nodes that it uses. if leafverb is given, caller:leafverb is called on all leaves in tree.
help #14:_listfind_nth Information about ghblu(#14):_listfind_nth
----
_listfind_nth(nodelist,key) => {i,k} where i is the smallest i such that the sum of the first i elements of intlist is > key, and k==key - sum(first i-1 elements).
1 <= i <= length(intlist)+1
help #14:length Information about ghblu(#14):length
----
:length(tree) => number of leaves in tree.
help #14:next Information about ghblu(#14):next
----
:next(@handle) => {list of more leaf nodes, @newhandle}
help #14:_rmerge Information about ghblu(#14):_rmerge
----
:_rmerge(home, tree, insertree) => newtree
(newtree is tree with insertree appended to the right) insertree is assumed to be of height < tree
help #14:_scrunch Information about ghblu(#14):_scrunch
----
:_scrunch(home,tree) => newtree
decapitates single-child nodes from the top of the tree, returns new root.
help #14:set_nth Information about ghblu(#14):set_nth
----
:set_nth(tree,n,value) => tree
modifies tree so that nth leaf == value
help #14:_set_nth Information about ghblu(#14):_set_nth
----
:_set_nth(home,tree,n,value) => tree[n] = value
Assumes n in [1..tree[2]]
help #14:_skill Information about ghblu(#14):_skill
----
:_skill(home,node,leafverb)
home:_kill's node and all descendants, home:(leafverb)'s all leaves
help #14:_smerge Information about ghblu(#14):_smerge
----
_smerge(home, height, ltree, rtree) =>{ltree[,rtree]}
assumes ltree and rtree are at the given height.
merges the trees if the combined number of children is <= maxfanout otherwise returns two trees where ltree is guaranteed minfanout children and rtree is guaranteed the minimum of minfanout and however many children it started with.
help #14:_split Information about ghblu(#14):_split
----
_split(home, height,lmax,ltree[,@rtrees]}) => {ltree,[mtree,]@rtrees} ltree is split after the lmax'th leaf, the righthand portion grafted onto the leftmost of the rtrees, if possible. Otherwise we create a new tree mtree, stealing from rtrees[1] if necessary.
Assumes 1<=lmax<ltree[2]
help #14:start Information about ghblu(#14):start
----
:start(tree,first,last) => {list of leaf nodes, @handle} handle is of the form {{node,next,size}...}

L

===== help $list_utils ===============================
list_utilities (#55):
----

list_utilities (#55) [ readable ]
  Owned by Hacker (#37).
  Child of Generic Utilities Package (#79).
#55:append#55:arrayset #55:assoc
#55:assoc_prefix#55:check_nonstring_tell_lines #55:compress
#55:count#55:find_insert #55:flatten*_suspended
#55:iassoc#55:iassoc_prefix #55:iassoc_sorted
#55:iassoc_suspended#55:"longest shortest" #55:make
#55:map_arg#55:map_builtin #55:map_prop*erty
#55:map_verb#55:randomly_permute#55:randomly_permute_suspended
#55:range#55:remove_duplicates #55:reverse
#55:_reverse#55:reverse_suspended #55:_reverse_suspended
#55:setremove_all#55:slice #55:sort
#55:sort_alist#55:sort_alist_suspended #55:sort_suspended
append            (list,list,..) => result of concatenating the given lists
reverse           (list)         => reversed list
remove_duplicates (list)         => list with all duplicates removed
compress          (list)         => list with consecutive duplicates removed
setremove_all     (list,elt)     => list with all occurrences of elt removed
find_insert       (sortedlist,e) => index of first element > e in sorted list
sort              (list[,keys])  => sorted list
count             (elt,list)     => count of elt found in list.
flatten           (list)         => flatten all recursive lists into one list

make              (n[,e])        => list of n copies of e
range             (m,n)          => {m,m+1,...,n}

arrayset   (list,val,i[,j,k...]) => array modified so that list[i][j][k]==val

-- Mapping functions (take a list and do something to each element):

map_prop ({o...},prop)              => list of o.(prop)            for all o
map_verb ({o...},verb[,args)        => list of o:(verb)(@args)     for all o
map_arg  ([n,]obj,verb,{a...},args) => list of obj:(verb)(a,@args) for all a
-- Association list functions --

An association list (alist) is a list of pairs (2-element lists), though the following functions have been generalized for lists of n-tuples (n-element lists). In each case i defaults to 1.

assoc        (targ,alist[,i]) => 1st tuple in alist whose i-th element is targ
iassoc       (targ,alist[,i]) => index of same.
assoc_prefix (targ,alist[,i]) => ... whose i-th element has targ as a prefix
iassoc_prefix(targ,alist[,i]) => index of same.
slice             (alist[,i]) => list of i-th elements
sort_alist        (alist[,i]) => alist sorted on i-th elements.

help #55:append Information about list_utilities(#55):append
----
append({a,b,c},{d,e},{},{f,g,h},...) => {a,b,c,d,e,f,g,h}
help #55:arrayset Information about list_utilities(#55):arrayset
----
arrayset(list,value,pos1,...,posn) -- returns list modified such that list[pos1][pos2][...][posn] == value
help #55:assoc Information about list_utilities(#55):assoc
----
assoc(target,list[,index]) returns the first element of `list' whose own index-th element is target. Index defaults to 1.
returns {} if no such element is found
help #55:assoc_prefix Information about list_utilities(#55):assoc_prefix
----
assoc_prefix(target,list[,index]) returns the first element of `list' whose own index-th element has target as a prefix. Index defaults to 1.
help #55:check_nonstring_tell_lines Information about list_utilities(#55):check_nonstring_tell_lines
----
check_nonstring_tell_lines(lines)
help #55:compress Information about list_utilities(#55):compress
----
compress(list) => list with consecutive repeated elements removed, e.g., compress({a,b,b,c,b,b,b,d,d,e}) => {a,b,c,b,d,e}
help #55:count Information about list_utilities(#55):count
----
$list_utils:count(item, list)
Returns the number of occurrences of item in list.
help #55:find_insert Information about list_utilities(#55):find_insert
----
find_insert(sortedlist,key) => index of first element in sortedlist > key sortedlist is assumed to be sorted in increasing order and the number returned is anywhere from 1 to length(sortedlist)+1, inclusive.
help #55:flatten_suspended Information about list_utilities(#55):flatten*_suspended
----
:flatten*_suspended(LIST list_of_lists) => LIST of all lists in given list `flattened'
help #55:iassoc Information about list_utilities(#55):iassoc
----
iassoc(target,list[,index]) returns the index of the first element of `list' whose own index-th element is target. Index defaults to 1.
returns 0 if no such element is found.
help #55:iassoc_prefix Information about list_utilities(#55):iassoc_prefix
----
iassoc_prefix(target,list[,index]) returns the index of the first element of `list' whose own index-th element has target as a prefix. Index defaults to 1.
help #55:iassoc_sorted Information about list_utilities(#55):iassoc_sorted
----
iassoc_sorted(target,sortedlist[,i]) => index of last element in sortedlist whose own i-th element is <= target. i defaults to 1. sortedlist is assumed to be sorted in increasing order and the number returned is anywhere from 0 to length(sortedlist), inclusive.
help #55:iassoc_suspended Information about list_utilities(#55):iassoc_suspended
----
iassoc(target,list[,index]) returns the index of the first element of `list' whose own index-th element is target. Index defaults to 1.
returns 0 if no such element is found. suspends as needed.
help #55:longest Information about list_utilities(#55):longest/shortest
----
Copied from APHiD (#33119):longest Sun May 9 21:00:18 1993 PDT
$list_utils:longest(<list>)
$list_utils:shortest(<list>)
- Returns the shortest or longest element in the list. Elements may be either strings or lists. Returns E_TYPE if passed a non-list or a list containing non-string/list elements. Returns E_RANGE if passed an empty list.
help #55:make Information about list_utilities(#55):make
----
:make(n[,elt]) => a list of n elements, each of which == elt. elt defaults to 0.
help #55:map_arg Information about list_utilities(#55):map_arg
----
map_arg([n,]object,verb,@args) -- assumes the nth element of args is a list, calls object:verb(@args) with each element of the list substituted in turn, returns the list of results. n defaults to 1.
map_verb_arg(o,v,{a...},a2,a3,a4,a5)={o:v(a,a2,a3,a4,a5),...} map_verb_arg(4,o,v,a1,a2,a3,{a...},a5)={o:v(a1,a2,a3,a,a5),...}
help #55:map_builtin Information about list_utilities(#55):map_builtin
----
:map_builtin(objectlist,func) applies func to each of the objects in turn and returns the corresponding list of results. This function is mainly here for completeness -- in the vast majority of situations, a simple for loop is better.
help #55:randomly_permute Information about list_utilities(#55):randomly_permute
----
:randomly_permute(list) => list with its elements randomly permuted each of the length(list)! possible permutations is equally likely
help #55:randomly_permute_suspended Information about list_utilities(#55):randomly_permute_suspended
----
:randomly_permute_suspended(list) => list with its elements randomly permuted each of the length(list)! possible permutations is equally likely
help #55:range Information about list_utilities(#55):range
----
:range([m,]n) => {m,m+1,...,n}
help #55:remove_duplicates Information about list_utilities(#55):remove_duplicates
----
remove_duplicates(list) => list as a set, i.e., all repeated elements removed.
help #55:reverse Information about list_utilities(#55):reverse
----
reverse(list) => reversed list
help #55:_reverse Information about list_utilities(#55):_reverse
----
:_reverse(@list) => reversed list
help #55:reverse_suspended Information about list_utilities(#55):reverse_suspended
----
reverse(list) => reversed list. Does suspend(0) as necessary.
help #55:_reverse_suspended Information about list_utilities(#55):_reverse_suspended
----
:_reverse(@list) => reversed list
help #55:setremove_all Information about list_utilities(#55):setremove_all
----
:setremove_all(set,elt) => set with *all* occurences of elt removed
help #55:slice Information about list_utilities(#55):slice
----
slice(alist[,index]) returns a list of the index-th elements of the elements of alist, e.g.,
slice({{"z",1},{"y",2},{"x",5}},2) => {1,2,5}.
index defaults to 1 and may also be a nonempty list, e.g.,
slice({{"z",1,3},{"y",2,4}},{2,1}) => {{1,"z"},{2,"y"}}
help #55:sort Information about list_utilities(#55):sort
----
sort(list[,keys]) => sorts keys (assumed to be all numbers or strings) and returns list with the corresponding permutation applied to it. keys defaults to the list itself.
sort({x1,x3,x2},{1,3,2}) => {x1,x2,x3}
help #55:sort_alist Information about list_utilities(#55):sort_alist
----
:sort_alist(alist[,n]) sorts a list of tuples by n-th (1st) element.
help #55:sort_alist_suspended Information about list_utilities(#55):sort_alist_suspended
----
sort_alist_suspended(interval,alist[,n]) sorts a list of tuples by n-th element. n defaults to 1. Calls suspend(interval) as necessary.
help #55:sort_suspended Information about list_utilities(#55):sort_suspended
----
:sort_suspended(interval,list[,keys]) => sorts keys (assumed to be all numbers or strings) and returns list with the corresponding permutation applied to it. keys defaults to the list itself. does suspend(interval) as needed.