diff --git a/CHANGELOG.md b/CHANGELOG.md index e33d022..b057503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ gcd. * Any value can now be passed as `assert` error message (and will be converted to str) * `$` and the following identifier can now be spaced (`$ id` is now valid) +* `paraghraphs` argument of function `lorem.ipsum` is now optional and defaults + to 1 ### Fixed * Fixed a crash in `math.log` on base=1 diff --git a/lib_/lorem.noug b/lib_/lorem.noug index c684530..f5e6f42 100644 --- a/lib_/lorem.noug +++ b/lib_/lorem.noug @@ -7,7 +7,7 @@ # Lorem: a lorem ipsum library import random -def ipsum(paragraphs) +def ipsum()(paragraphs=1) assert is_int(paragraphs), "first argument of function 'lorem.ipsum' SHOULD be an integer." assert paragraphs >= 0, "first argument of function 'lorem.ipsum' SHOULD be positive." if paragraphs == 0 then return ""