Since K is already bound in K=fastfib(25), that expression becomes a comparison instead of a bind.<br><br>
What the code really means is...<br><br>fib(25)  = fastfib(25),<br>
<br>Dan.<br><br><div class="gmail_quote">On Wed, Mar 25, 2009 at 6:52 AM, Angel <span dir="ltr"><<a href="mailto:clist@uah.es">clist@uah.es</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi list<br>
<br>
Im very new to erlang, just still astonished about erlang and all, you guys, say here<br>
<br>
Still im trying every day going deeper and deeper on erlang and functional programing.<br>
<br>
Got recently very please reading Joe's introcction to TTD and Unit test on erlang<br>
<br>
shttp://<a href="http://armstrongonsoftware.blogspot.com/2009/01/micro-lightweight-unit-testing.html" target="_blank">armstrongonsoftware.blogspot.com/2009/01/micro-lightweight-unit-testing.html</a><br>
<br>
some where in the article Joe says..<br>
<br>
step 4) Add unit tests for fastfib<br>
<br>
test/0 looks like this:<br>
<br>
test() -><br>
0 = fib(0),<br>
1 = fib(1),<br>
1 = fib(2),<br>
6765 = fib(20),<br>
0 = fastfib(0),<br>
1 = fastfib(1),<br>
1 = fastfib(2),<br>
2 = fastfib(3),<br>
K = fib(25),<br>
K = fastfib(25),<br>
ok.<br>
<br>
Here I check that fastfib returns the same value as fib with the lines<br>
  K = fib(25),<br>
K = fastfib(25).<br>
<br>
But K=fib(25) binds K to the value fib(25) so, K= fastbib(25) must be wrong<br>
as K was previously bound to fib(25) ¿isnt it?<br>
<br>
so, What im missing here ?<br>
<br>
Thanks<br>
<br>
--<br>
No imprima este correo si no es necesario. El medio ambiente está en nuestras manos.<br>
__________________________________________<br>
<br>
Clist UAH a.k.a Angel<br>
__________________________________________<br>
...being the second biggest search engine in the world is good enough for us. Peter @ Pirate Bay.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Daniel Goertzen<br>-----------------<br>work email: <a href="mailto:dang@networkintegritysystems.com">dang@networkintegritysystems.com</a><br>work phone: 1 443 303 8525<br>
work sip: <a href="mailto:945050@fwd.pulver.com">945050@fwd.pulver.com</a><br>-----------------<br>mobile: 1 204 470 8360<br>-----------------<br>home email: <a href="mailto:daniel.goertzen@gmail.com">daniel.goertzen@gmail.com</a><br>
home phone: 1 204 272 6149<br><br><br>