<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi.</p>
<br>
<blockquote type="cite"
cite="mid:CANEMoNvrw31vFuMGmOLKBir_=2m69KJ7vAOvi+HMCmsxaVWAfw@mail.gmail.com">
<pre wrap="">Yes, the example with Let Name Term Term is what I was experimenting with.
About "eval t2 . (update' <*> pure s <*> eval t1)":
Well I was following applicative style as "Applicative Programming
with Effects" by Conor McBride
I did not consider this line applicative because of the (.) operator;
I am trying to get away with just `pure` and `<*>` -- to be more
precise, the K and S combinators.
So the question becomes: can we implement the environment modification
operation without resorting to function composition?
</pre>
</blockquote>
<br>
<p>Note that for <tt>(->)</tt>, <tt>(<$>)</tt><tt> = </tt><tt>(</tt><tt>.)</tt>.<br>
</p>
<p>Thus</p>
<pre wrap=""> eval t2 . bracket ≡ eval t2 <$> bracket</pre>
<p>Note also that by definition <tt>(<$>) = (<*>) .
pure</tt> and therefore<tt><br>
</tt></p>
<pre wrap=""> eval t2 <$> bracket ≡ pure (eval t2) <*> bracket
</pre>
<p>So more precisely<br>
</p>
<p> </p>
<pre wrap=""> eval t2 . (update' <*> pure s <*> eval t1) ≡ pure (eval t2) <*> (update' <*> pure s <*> eval t1)</pre>
<p>which, as per your requirements, uses only pure and (<*>)
(plus function application and brackets).</p>
<p>Is this what you where going for? If not I think we would need
more precisely defined requirements to help further.</p>
<p>Cheers.<br>
</p>
</body>
</html>