diff options
author | Marvin Borner | 2024-03-21 12:51:02 +0100 |
---|---|---|
committer | Marvin Borner | 2024-03-21 12:51:02 +0100 |
commit | 93b53a5354620d94b128008d0b17670cc87c92f5 (patch) | |
tree | c1f5c80b9d2fb0c8750ddb69b281450e7033e556 /samples/rosetta/least_common_multiple.bruijn | |
parent | 8b82e5d7f485fc76250b9ed2ad756b913e930df1 (diff) |
Added lcm
Diffstat (limited to 'samples/rosetta/least_common_multiple.bruijn')
-rw-r--r-- | samples/rosetta/least_common_multiple.bruijn | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/samples/rosetta/least_common_multiple.bruijn b/samples/rosetta/least_common_multiple.bruijn new file mode 100644 index 0000000..9a6c08e --- /dev/null +++ b/samples/rosetta/least_common_multiple.bruijn @@ -0,0 +1,8 @@ +:import std/Math . + +lcm [[=?1 1 (=?0 0 |(1 / (gcd 1 0) ⋅ 0))]] + +:test ((lcm (+12) (+18)) =? (+36)) ([[1]]) +:test ((lcm (+42) (+25)) =? (+1050)) ([[1]]) + +main [[0]] |