Left factorials: Difference between revisions
Content added Content deleted
No edit summary |
No edit summary |
||
Line 1,869: | Line 1,869: | ||
{{incorrect|Lambdatalk| <br><br> The first range of left factorials should start with 0 (zero), not 2. <br><br> |
{{incorrect|Lambdatalk| <br><br> The first range of left factorials should start with 0 (zero), not 2. <br><br> |
||
<center>Hi Rosetta, I fixed the code. Thanks for the warning, it gave me a chance to improve it. At least that's what I think.</center> |
<center>Hi Rosetta, '''I fixed the code'''. Thanks for the warning, it gave me a chance to improve it. At least that's what I think.</center> |
||
}} |
}} |
||
The code can be tested in this wiki page: http://lambdaway.free.fr/lambdawalks/?view=left_factorial |
The code can be tested in this wiki page: http://lambdaway.free.fr/lambdawalks/?view=left_factorial |
||
<lang scheme> |
<lang scheme> |
||
'''1) defining !n''' |
|||
{def !n // the main function's name |
{def !n // the main function's name |
||
Line 1,898: | Line 1,898: | ||
1 {S.map !n.get {S.serie 1 {- :n 1}}}}}}} // the sequence of computed values |
1 {S.map !n.get {S.serie 1 {- :n 1}}}}}}} // the sequence of computed values |
||
'''2) the task''' |
|||
A) computing !n from 2 to 10 takes about 4ms |
A) computing !n from 2 to 10 takes about 4ms |