From 1660789c43cb652b6b7802ff45d9cd61f0d7745c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Wed, 22 Mar 2023 23:00:02 +0100 Subject: [PATCH] Document the primes module. --- README.md | 13 +++++++++++++ primes.scm | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fb7e19..0ce672e 100644 --- a/README.md +++ b/README.md @@ -239,6 +239,19 @@ Returns the period from the list of periods ```ps``` the given month ### Primes +A very simple module for generating and checking 4-digit prime numbers. + + (is-4digit-prime? n) + +* ```n``` - a number + +Returns true if the given number ```n``` has four digits and it is a +prime number. + + (gen-all-4digit-primes) + +Returns a list of all 4-digit prime numbers. + Generic Support Modules ----------------------- diff --git a/primes.scm b/primes.scm index 3544f46..1427504 100644 --- a/primes.scm +++ b/primes.scm @@ -28,9 +28,9 @@ (module primes ( - primes-tests! is-4digit-prime? gen-all-4digit-primes + primes-tests! ) (import scheme