From 07a10edb2350e7862a9dea351183056bf2c3ddb3 Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Mon, 25 May 2026 15:37:48 -0700 Subject: [PATCH] Format all `instructions.append.md` to start with an H1 (required but ignored) and H2 --- .../accumulate/.docs/instructions.append.md | 7 +++--- .../anagram/.docs/instructions.append.md | 2 ++ .../.docs/instructions.append.md | 7 +++--- .../dot-dsl/.docs/instructions.append.md | 5 +++-- .../.docs/instructions.append.md | 7 +++--- .../gigasecond/.docs/instructions.append.md | 6 +++-- .../list-ops/.docs/instructions.append.md | 22 +++++++++++++------ .../zebra-puzzle/.docs/instructions.append.md | 4 +++- .../zipper/.docs/instructions.append.md | 7 ++++-- 9 files changed, 43 insertions(+), 24 deletions(-) diff --git a/exercises/practice/accumulate/.docs/instructions.append.md b/exercises/practice/accumulate/.docs/instructions.append.md index f06e1886..07cd640c 100644 --- a/exercises/practice/accumulate/.docs/instructions.append.md +++ b/exercises/practice/accumulate/.docs/instructions.append.md @@ -1,6 +1,5 @@ -# Hints +# Instructions append -You'll need to use the [uplevel](https://tcl.tk/man/tcl8.6/TclCmd/upvar.htm) -and [upvar](https://tcl.tk/man/tcl8.6/TclCmd/upvar.htm) commands for this -exercise. +## Hints +You'll need to use the [uplevel](https://tcl.tk/man/tcl8.6/TclCmd/upvar.htm) and [upvar](https://tcl.tk/man/tcl8.6/TclCmd/upvar.htm) commands for this exercise. diff --git a/exercises/practice/anagram/.docs/instructions.append.md b/exercises/practice/anagram/.docs/instructions.append.md index 2b17bb7a..0f5c35b6 100644 --- a/exercises/practice/anagram/.docs/instructions.append.md +++ b/exercises/practice/anagram/.docs/instructions.append.md @@ -1,3 +1,5 @@ # Instructions Append +## Implementation + You must return the anagrams in the same order as they are listed in the candidate words. diff --git a/exercises/practice/complex-numbers/.docs/instructions.append.md b/exercises/practice/complex-numbers/.docs/instructions.append.md index 4e6acaf7..5db56448 100644 --- a/exercises/practice/complex-numbers/.docs/instructions.append.md +++ b/exercises/practice/complex-numbers/.docs/instructions.append.md @@ -1,5 +1,6 @@ -# Implementing functions for the `expr` command +# Instructions append + +## Implementing functions for the `expr` command Some of these tests require you to create new functions for the `expr` command. -Read the Tcl [mathfunc](https://www.tcl-lang.org/man/tcl8.6/TclCmd/mathfunc.htm) -documentation to learn how. +Read the Tcl [mathfunc](https://www.tcl-lang.org/man/tcl8.6/TclCmd/mathfunc.htm) documentation to learn how. diff --git a/exercises/practice/dot-dsl/.docs/instructions.append.md b/exercises/practice/dot-dsl/.docs/instructions.append.md index 25cbbf96..6331df60 100644 --- a/exercises/practice/dot-dsl/.docs/instructions.append.md +++ b/exercises/practice/dot-dsl/.docs/instructions.append.md @@ -1,4 +1,6 @@ -# DOT Language Spec +# Instructions append + +## DOT Language Spec Although the DOT language has a [formal specification][DOT-spec], the tests for this exercise do not expect the full specification to be implemented. @@ -6,4 +8,3 @@ The Tcl wiki has [some notes about domain-specific languages][DSL-wiki]. [DOT-spec]: https://www.graphviz.org/doc/info/lang.html [DSL-wiki]: https://wiki.tcl-lang.org/page/domain-specific+language - diff --git a/exercises/practice/error-handling/.docs/instructions.append.md b/exercises/practice/error-handling/.docs/instructions.append.md index 8ff8b7ca..e2dba026 100644 --- a/exercises/practice/error-handling/.docs/instructions.append.md +++ b/exercises/practice/error-handling/.docs/instructions.append.md @@ -1,4 +1,5 @@ -# Resources +# Instructions append -The Tcl Wiki entry on [Errors management](https://wiki.tcl-lang.org/page/Errors+management) -is useful for this exercise. +## Resources + +The Tcl Wiki entry on [Errors management](https://wiki.tcl-lang.org/page/Errors+management) is useful for this exercise. diff --git a/exercises/practice/gigasecond/.docs/instructions.append.md b/exercises/practice/gigasecond/.docs/instructions.append.md index a819af06..fea40735 100644 --- a/exercises/practice/gigasecond/.docs/instructions.append.md +++ b/exercises/practice/gigasecond/.docs/instructions.append.md @@ -1,5 +1,7 @@ -# placeholder +# Instructions append -To solve this exercise in Tcl, you'll need to use [the `clock` command][clock] +## Implementation + +To solve this exercise in Tcl, you'll need to use [the `clock` command][clock]. [clock]: https://www.tcl-lang.org/man/tcl8.6/TclCmd/clock.htm diff --git a/exercises/practice/list-ops/.docs/instructions.append.md b/exercises/practice/list-ops/.docs/instructions.append.md index b7cb4e57..892c2314 100644 --- a/exercises/practice/list-ops/.docs/instructions.append.md +++ b/exercises/practice/list-ops/.docs/instructions.append.md @@ -1,26 +1,34 @@ -# The Tcl `apply` command +# Instructions append + +## The Tcl `apply` command + +The test cases may look confusing. +You are expected to implement this: -The test cases may look confusing. You are expected to implement this: ```tcl set myList {alpha beta gamma delta} listOps::filter $myList {{word} {expr {[string length $word] == 4}} ``` + Why does that last argument have so many braces? Recall that the `proc` command is defined as: + ```tcl proc procName argList body ``` Tcl has an `apply` command: + ```tcl apply func ?arg1 arg2 ...? ``` -this "func" is a two element list `{argList body}` that is essentially an -anonymous proc (or "lambda"). The `apply` command invokes that anonymous -proc, passing it the arguments it needs. + +this "func" is a two element list `{argList body}` that is essentially an anonymous proc (or "lambda"). +The `apply` command invokes that anonymous proc, passing it the arguments it needs. As an example, these are equivalent: + ```tcl # using proc proc myReverse {str} {return [string reverse $str]} @@ -33,7 +41,7 @@ puts [apply {{str} {string reverse $str}} "Hello, World!"] set func {{str} {string reverse $str}} puts [apply $func "Hello, World!"] ``` + Using `apply` makes it simpler to pass around blocks of code. -Ref: [`apply`](https://tcl.tk/man/tcl8.6/TclCmd/apply.htm), -[`proc`](https://tcl.tk/man/tcl8.6/TclCmd/proc.htm). +Ref: [`apply`](https://tcl.tk/man/tcl8.6/TclCmd/apply.htm), [`proc`](https://tcl.tk/man/tcl8.6/TclCmd/proc.htm). diff --git a/exercises/practice/zebra-puzzle/.docs/instructions.append.md b/exercises/practice/zebra-puzzle/.docs/instructions.append.md index 3e40630a..3d6b9598 100644 --- a/exercises/practice/zebra-puzzle/.docs/instructions.append.md +++ b/exercises/practice/zebra-puzzle/.docs/instructions.append.md @@ -1,4 +1,6 @@ -# Tcl Packages +# Instructions append + +## Tcl Packages This is the first exercise to include a pre-written package. Note the presence of the file `pkgIndex.tcl` and the inclusion of the current directory in the `auto_path` variable. diff --git a/exercises/practice/zipper/.docs/instructions.append.md b/exercises/practice/zipper/.docs/instructions.append.md index 78fb8f39..a1e6c4bd 100644 --- a/exercises/practice/zipper/.docs/instructions.append.md +++ b/exercises/practice/zipper/.docs/instructions.append.md @@ -1,3 +1,6 @@ -# Scope +# Instructions append -You'll find a Tree class already implemented for you. Your task is to write the Zipper class. +## Scope + +You'll find a Tree class already implemented for you. +Your task is to write the Zipper class.