aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/euler
diff options
context:
space:
mode:
authorMarvin Borner2024-03-25 18:59:03 +0100
committerMarvin Borner2024-03-25 18:59:48 +0100
commit14e38ce378236cf54924b58396168c1e94f8e6b2 (patch)
treeecbbb75517695de8897a2a9c58aa1a97ec2546f5 /samples/euler
parentf8398804d351667a7b887b89f6f70c7d5c407d22 (diff)
Improved samples by adding links to problems
Diffstat (limited to 'samples/euler')
-rw-r--r--samples/euler/001.bruijn2
-rw-r--r--samples/euler/006.bruijn2
2 files changed, 2 insertions, 2 deletions
diff --git a/samples/euler/001.bruijn b/samples/euler/001.bruijn
index 1678b58..72b605f 100644
--- a/samples/euler/001.bruijn
+++ b/samples/euler/001.bruijn
@@ -3,7 +3,7 @@
:import std/Math .
solve [∑(crit <#> ({ (+0) → --0 }))]
- crit φ m ((\mod (+3)) → zero?) ((\mod (+5)) → zero?)
+ crit [ψ m ((mod 0) → zero?) (+3) (+5)]
:test ((solve (+10)) =? (+23)) ([[1]])
diff --git a/samples/euler/006.bruijn b/samples/euler/006.bruijn
index 75582c7..4de0d10 100644
--- a/samples/euler/006.bruijn
+++ b/samples/euler/006.bruijn
@@ -1,7 +1,7 @@
:import std/Combinator .
:import std/Math .
-solve [|(sum-of-squares - square-of-sum)]
+solve [square-of-sum - sum-of-squares]
sum-of-squares ∑ (+1) → 0 | (\pow (+2))
square-of-sum (∑ (+1) → 0 | i) ** (+2)