diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-20 02:15:47 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-20 02:15:47 +0200 |
commit | c0a20410d550295727026a41d31b222a246f3d6a (patch) | |
tree | a104379e4a92a5dd84266b4d20943d733fd7b459 | |
parent | Change cross-product to take any number of lists. (diff) | |
download | calp-c0a20410d550295727026a41d31b222a246f3d6a.tar.gz calp-c0a20410d550295727026a41d31b222a246f3d6a.tar.xz |
Add group prodedure.
Diffstat (limited to '')
-rw-r--r-- | module/util.scm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/module/util.scm b/module/util.scm index bb1fdcd5..d54ad07b 100644 --- a/module/util.scm +++ b/module/util.scm @@ -501,6 +501,11 @@ (and=>> (and=> value proc) rest ...)])) +(define-public (group list width) + (unless (null? list) + (let* ((row rest (split-at list width))) + (cons row (group rest width))))) + (define-syntax let-env |