commit e67fe553e2eed062df921685fd6f9bb49ed4b526 Author: Christopher P. Brown Date: Wed Jul 7 14:42:35 2021 -0600 dozens.forth diff --git a/dozens.md b/dozens.md new file mode 100644 index 0000000..e7f15d5 --- /dev/null +++ b/dozens.md @@ -0,0 +1,28 @@ +# Dozens + +how many dozens? + +## About + +This document is a valid literate style retro forth program. You can execute it with `retro dozens.md`, or include it in a file or in the repl with `'dozens.md include`. + +## Contents + +~~~ +:dozens (n-n) #12 * ; +~~~ + +That's it. That's the whole thing. + +## Testing + +Run the test with `retro -t Dozens.forth`: + +``` +'GROSS_CHECK s:put nl +'12_dozens_should_be_144 s:put nl + +#12 dozens +dup #144 eq? [ 'PASS s:put ] [ 'FAIL s:put ] choose +sp n:put +```