<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="robots" content="index,nofollow">



<title>EtaExpansion - MLton Standard ML Compiler (SML Compiler)</title>
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="all" href="common.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="screen" href="screen.css">
<link rel="stylesheet" type="text/css" charset="iso-8859-1" media="print" href="print.css">


<link rel="Start" href="Home">


</head>

<body lang="en" dir="ltr">

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-833377-1";
urchinTracker();
</script>
<table bgcolor = lightblue cellspacing = 0 style = "border: 0px;" width = 100%>
  <tr>
    <td style = "
		border: 0px;
		color: darkblue; 
		font-size: 150%;
		text-align: left;">
      <a class = mltona href="Home">MLton MLTONWIKIVERSION</a>
    <td style = "
		border: 0px;
		font-size: 150%;
		text-align: center;
		width: 50%;">
      EtaExpansion
    <td style = "
		border: 0px;
		text-align: right;">
      <table cellspacing = 0 style = "border: 0px">
        <tr style = "vertical-align: middle;">
      </table>
  <tr style = "background-color: white;">
    <td colspan = 3
	style = "
		border: 0px;
		font-size:70%;
		text-align: right;">
      <a href = "Home">Home</a>
      &nbsp;<a href = "Index">Index</a>
      &nbsp;
</table>
<div id="content" lang="en" dir="ltr">
Eta expansion is a simple syntactic change used to work around the <a href="ValueRestriction">ValueRestriction</a> in <a href="StandardML">Standard ML</a>. <p>
The eta expansion of an expression <tt>e</tt> is the expression  <tt>fn&nbsp;z&nbsp;=&gt;&nbsp;e&nbsp;z</tt>, where <tt>z</tt> does not occur in <tt>e</tt>.  This only makes sense if <tt>e</tt> denotes a function, i.e. is of arrow type.  Eta expansion delays the evaluation of <tt>e</tt> until the function is applied, and will re-evaluate <tt>e</tt> each time the function is applied. 
</p>
<p>
The name "eta expansion" comes from the eta-conversion rule of the <a href="LambdaCalculus">lambda calculus</a>.  Expansion refers to the directionality of the equivalence being used, namely taking <tt>e</tt> to <tt>fn&nbsp;z&nbsp;=&gt;&nbsp;e&nbsp;z</tt> rather than <tt>fn&nbsp;z&nbsp;=&gt;&nbsp;e&nbsp;z</tt> to <tt>e</tt> (eta contraction). 
</p>
</div>



<p>
<hr>
Last edited on 2006-03-28 00:57:50 by <span title="adsl-71-141-33-187.dsl.snfc21.sbcglobal.net"><a href="StephenWeeks">StephenWeeks</a></span>.
</body></html>
