<!--
  - Authors:
  -   Denys Duchier <duchier@ps.uni-sb.de>
  -   Leif Kornstaedt <kornstae@ps.uni-sb.de>
  -   Christian Schulte <schulte@ps.uni-sb.de>
  -
  - Contributors:
  -   Daniel Simon <dansim@ps.uni-sb.de> (SGML Translation)
  -
  - Copyright:
  -   Denys Duchier, Leif Kornstaedt, and Christian Schulte, 1998
  -
  - Last change:
  -   $Date$ by $Author$
  -   $Revision$
  -
  - This file is part of Mozart, an implementation of Oz 3:
  -   http://www.mozart-oz.org
  -
  - See the file "LICENSE" or
  -   http://www.mozart-oz.org/LICENSE.html
  - for information on usage and redistribution
  - of this file, and for a DISCLAIMER OF ALL
  - WARRANTIES.
  -
  -->

<Chapter id="chapter.proccells">
  <Title/Procedures and Cells/
  <Section id="section.proccells.procedures">
    <Title/Procedures/
    <P>
      The module <Span class=index/<<Procedure>>/ specifies operations on
      procedures.
      <List>
	<Entry><Span class=index/<<IsProcedure>>/
	  <Index class=tails/<<Procedure>><And><<is>>/
	<Synopsis>
	  <<{Procedure.is ?+{X} ??{B}}>>
	<Item>
	  tests whether ?_{X} is a procedure.

	<Entry><Span class=index/<<ProcedureArity>>/
	  <Index class=tails/<<Procedure>><And><<arity>>/
	<Synopsis>
	  <<{Procedure.arity ?+{P} ??{I}}>>
	<Item>
	  returns the procedure arity of&nbsp;?_{P}, &ie;, the number of
	  arguments which ?_{P} takes.

	<Entry><<apply>>
	  <Index class=tails/<<Procedure>><And><<apply>>/
	<Synopsis>
	  <<{Procedure.apply ?+{P} ?+{Xs}}>>
	<Item>
	  applies the procedure&nbsp;?_{P} to the arguments given
	  by the elements of the list&nbsp;?_{Xs}, provided that
	  <<<{Procedure.arity ?_{P}} == {Length ?_{Xs}}>>>
      </List>

  <Section id="section.proccells.cells">
    <Title/Cells/
    <P>
      The module <Span class=index/<<Cell>>/ contains procedures operating
      on cells.
      <List>
	<Entry><Span class=index/<<IsCell>>/
	  <Index class=tails/<<Cell>><And><<is>>/
	<Synopsis>
	  <<{Cell.is ?+{X} ??{B}}>>
	<Item>
	  tests whether ?_{X} is a cell.

	<Entry><Span class=index/<<NewCell>>/
	  <Index class=tails/<<Cell>><And><<new>>/
	<Synopsis>
	  <<{Cell.new ?_{X} ??{Cell}}>>
	<Item>
	  returns a new cell with initial content&nbsp;?_{X}.

	<Entry><Span class=index/<<Exchange>>/
	  <Index/<<Cell>><And><<exchange>>/
	<Synopsis>
	  <<{Cell.exchange ?+{Cell} ?_{X} ?_{Y}}>>
	<Item>
	  returns the current content of ?_{Cell} in&nbsp;?_{X}, and sets the
	  content of ?_{Cell} to&nbsp;?_{Y}.

	<Entry><Span class=index/<<Access>>/
	  <Index/<<Cell>><And><<access>>/
	<Synopsis>
	  <<{Cell.access ?+{Cell} ?_{X}}>>
	<Item>
	  returns the current content of ?_{Cell} in&nbsp;?_{X}.

	<Entry><Span class=index/<<Assign>>/
	<Synopsis>
	  <<{Cell.assign ?+{Cell} ?_{X}}>>
	<Item>
	  sets the content of ?_{Cell} to&nbsp;?_{X}.
      </List>


</Chapter>
