From 2a05b0c3794dd6084c9dd27ca0ba733550843ae6 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 7 Mar 2019 10:04:36 -0800 Subject: [PATCH] note --- xenomorph/xenomorph/base.rkt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xenomorph/xenomorph/base.rkt b/xenomorph/xenomorph/base.rkt index 4a1f138a..6482b026 100644 --- a/xenomorph/xenomorph/base.rkt +++ b/xenomorph/xenomorph/base.rkt @@ -35,6 +35,13 @@ (file-position p new-pos)) (file-position p)) +#| +We make `parent` a kwarg so that we can pass it without necessitating an explicit port-arg. (Meaning, if it's positional, whenever we want to use it, we also have to make port-arg explicit, which is boring.) + +We don't make port-arg a kwarg because it's the most common arg passed. + +We don't make port-arg the last arg (similar to other Racket port funcs) because we want to let the functions be variable arity. +|# (define (decode xo [port-arg (current-input-port)] #:parent [parent #f] . args) (define port (cond