diff options
Diffstat (limited to 'samples/euler/006.bruijn')
-rw-r--r-- | samples/euler/006.bruijn | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/samples/euler/006.bruijn b/samples/euler/006.bruijn new file mode 100644 index 0000000..75582c7 --- /dev/null +++ b/samples/euler/006.bruijn @@ -0,0 +1,10 @@ +:import std/Combinator . +:import std/Math . + +solve [|(sum-of-squares - square-of-sum)] + sum-of-squares ∑ (+1) → 0 | (\pow (+2)) + square-of-sum (∑ (+1) → 0 | i) ** (+2) + +:test ((solve (+10)) =? (+2640)) ([[1]]) + +main [solve (+100)] |