diff options
Diffstat (limited to 'samples/rosetta/prime_decomposition.bruijn')
-rw-r--r-- | samples/rosetta/prime_decomposition.bruijn | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/samples/rosetta/prime_decomposition.bruijn b/samples/rosetta/prime_decomposition.bruijn new file mode 100644 index 0000000..0287889 --- /dev/null +++ b/samples/rosetta/prime_decomposition.bruijn @@ -0,0 +1,11 @@ +:import std/Combinator . +:import std/List . +:import std/Math . + +factors \divs primes + divs y [[&[[&[[3 ⋅ 3 >? 4 case-1 (=?0 case-2 case-3)]] (quot-rem 2 1)]]]] + case-1 4 >? (+1) {}4 empty + case-2 3 : (5 1 (3 : 2)) + case-3 5 4 2 + +main [factors <$> ({ (+42) → (+50) })] |