summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chapter-2/function-combinators.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/chapter-2/function-combinators.scm b/chapter-2/function-combinators.scm
index f16cb1a..2b820f2 100644
--- a/chapter-2/function-combinators.scm
+++ b/chapter-2/function-combinators.scm
@@ -17,6 +17,9 @@
(use-modules (srfi srfi-11))
+
+;; 2.1.1 Function combinators
+
(define (compose f g)
(lambda args
(f (apply g args))))
@@ -48,6 +51,9 @@
(lambda (u v w) (list 'bar u v w)))
'a 'b 'c)
+
+;; Arity
+
(define (get-arity f)
(let ((arity (procedure-minimum-arity f)))
(if arity (car arity) 0)))
@@ -100,7 +106,8 @@
;; Exercise 2.2: Arity extension
-;; Not sure how to accomplish this in Guile, honestly.
+;; Not sure how to accomplish this in Guile, honestly. There is no
+;; equivalent of procedure-arity-max that I can find.
;; Multiple values