Skip to content

Commit

Permalink
fix: minor changes to /func
Browse files Browse the repository at this point in the history
Closes #220
  • Loading branch information
gvwilson committed Aug 27, 2023
1 parent b4b9542 commit 25582ba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ release:
(cd docs && tar cf - $$(find . -name '*.css' -o -name '*.html' -o -name '*.ico' -o -name '*.jpg' -o -name '*.js' -o -name '*.png' -o -name '*.svg' -o -name '*.webp')) \
| (cd ${SDXPY_RELEASE} && tar xf -)
cd docs && zip -q -r ${SDXPY_RELEASE}/${ABBREV}-examples.zip . \
-i '*.ht' '*.json' '*.out' '*.py' '*.sh' '*.txt' '*.yml' \
-i '*.ht' '*.json' '*.out' '*.py' '*.sh' '*.tll' '*.txt' '*.yml' \
-x '*.css' '*.html' '*.ico' '*.js' '*.svg' '*.webp'
cd ${SDXPY_RELEASE} && unzip -q ${ABBREV}-examples.zip
endif
Expand Down
4 changes: 2 additions & 2 deletions docs/func/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ <h1>Chapter 8: Functions and Closures</h1>
to ask how <a class="gl-ref" href="../glossary/#gl:extensibility" title="How easily new features can be added to a program or existing features can be changed." markdown="1">extensible</a> it is,
i.e.,
how easily we can add or change things <span class="bib-ref">[<a class="bib-ref" href="../bib/#Wilson2022a">Wilson2022a</a>]</span>.
The answer for the <span class="ix-entry" ix-key="interpreter" markdown="1">interpreter</span> of <a class="x-ref" href="../interp/">Chapter 7</a> is pretty easily&rdquo;
The answer for the <span class="ix-entry" ix-key="interpreter" markdown="1">interpreter</span> of <a class="x-ref" href="../interp/">Chapter 7</a> is &ldquo;pretty easily&rdquo;
but the answer for the little language it interprets is &ldquo;not at all&rdquo;
because users cannot define new operations in the little language itself.
We need to give them a way to define and call functions.
Expand Down Expand Up @@ -695,7 +695,7 @@ <h3 class="exercise">Implicit Sequence</h3>
<li>
<p>Modify <code>do_func</code> so that if it is given more than one argument,
it uses all but the first as the body of the function
(i.e., treats every after the parameter list as an implicit <code>"seq"</code>).</p>
(i.e., treats everything after the parameter list as an implicit <code>"seq"</code>).</p>
</li>
<li>
<p>Is there a way to make this work in combination with
Expand Down
4 changes: 2 additions & 2 deletions src/func/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ One way to evaluate the design of a piece of software is
to ask how [%g extensibility "extensible" %] it is,
i.e.,
how easily we can add or change things [%b Wilson2022a %].
The answer for the [%i "interpreter" %] of [%x interp %] is pretty easily"
The answer for the [%i "interpreter" %] of [%x interp %] is "pretty easily"
but the answer for the little language it interprets is "not at all"
because users cannot define new operations in the little language itself.
We need to give them a way to define and call functions.
Expand Down Expand Up @@ -264,7 +264,7 @@ without requiring a separate `"set"` instruction.

1. Modify `do_func` so that if it is given more than one argument,
it uses all but the first as the body of the function
(i.e., treats every after the parameter list as an implicit `"seq"`).
(i.e., treats everything after the parameter list as an implicit `"seq"`).

2. Is there a way to make this work in combination with
naming-at-creation from the previous exercise?
Expand Down

0 comments on commit 25582ba

Please sign in to comment.