]> gitweb.factorcode.org Git - factor.git/commitdiff
Slightly modified project euler 72, and added some comments
authorGuillaume Nargeot <killy971@gmail.com>
Sat, 26 Sep 2009 10:07:31 +0000 (19:07 +0900)
committerGuillaume Nargeot <killy971@gmail.com>
Sat, 26 Sep 2009 10:07:31 +0000 (19:07 +0900)
extra/project-euler/072/072.factor

index de6312f2a7968b4371d7aea127946c7103f615d1..9fab6788bdb42687c359394ad06a8a8daac9c099 100644 (file)
@@ -30,7 +30,7 @@ IN: project-euler.072
 ! The answer can be found by adding totient(n) for 2 ≤ n ≤ 1e6
 
 : euler072 ( -- answer )
-    2 1000000 [a,b] [ totient ] [ + ] map-reduce ;
+    2 1000000 [a,b] [ totient ] sigma ;
 
 ! [ euler072 ] 100 ave-time
 ! 5274 ms ave run time - 102.7 SD (100 trials)