Repository navigation
Conversation
| "snippet::lcm": { | ||
| "id": "snippet::lcm", | ||
| "type": "simple", | ||
| "description": "You can compute the least common multiple by dividing the product of two integers by their greatest common divisor (found with the Euclidean algorithm), and reduce over the inputs for more than two values.", |
There was a problem hiding this comment.
your agent seems to mistakingly think we care what algorithm was used. let's remove that unnecessary information
There was a problem hiding this comment.
Removed the algorithm wording in c11ce37 and trimmed the PR description. Noted on reading the diff before opening PRs, thanks.
|
@Rutvij97 for future PRs, can you review your code beforehand, never trust your agent. today your agent and 3 others have leaked thoughts into these descriptions and it is time consuming for me to explain that in reviews. if you, the human, read the PR then you can fix it before i get to it. |
|
this conflicts with main now that compute-gcd landed. small thing: |
|
Pushed 41d4f3a with current main merged, retaining the compute-gcd mapping. The LCM helper now returns null for fewer than two values, including lcm(-7). Full formatting/manifest validation and the TypeScript build passed; eight additional cases covered empty/singleton input, negative values, zeros and multiple arguments. |
🔗 Linked issue
Resolves #1208
📚 Description
Adds
compute-lcmto the micro-utilities manifest with asnippet::lcmreplacement.The snippet takes any number of integers and reduces over them with a small
gcdhelper, which is included so the example stands on its own.compute-lcmalso accepts an array plus an accessor and validates its inputs;lcm(...arr)orlcm(...arr.map(accessor))covers the array case, and the snippet does not replace the input validation.