From 0683bb734cb62b84db1d4d821526d5a54daeb631 Mon Sep 17 00:00:00 2001 From: jack-z-wang <81378423+jack-z-wang@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:26:09 -0400 Subject: [PATCH] added hoon formatting to workbook challenges --- content/guides/additional/workbook/abc-blocks.md | 8 ++++---- content/guides/additional/workbook/luhn-number.md | 14 +++++++------- content/guides/additional/workbook/water-towers.md | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/content/guides/additional/workbook/abc-blocks.md b/content/guides/additional/workbook/abc-blocks.md index 08d9982..09066eb 100644 --- a/content/guides/additional/workbook/abc-blocks.md +++ b/content/guides/additional/workbook/abc-blocks.md @@ -57,7 +57,7 @@ dojo: naked generator failure Following a principle of test-driven development, we compose a series of tests which allow us to rigorously check for expected behavior. -``` +```hoon /+ *test /= abc-blocks /gen/abc-blocks |% @@ -184,7 +184,7 @@ _These solutions were submitted by the Urbit community as part of a competition _By ~dozreg-toplud. In the process, he found and fixed a bug in the implementation of `++curr`._ -``` +```hoon :: +abc-blocks: a solution to the HSL challenge #2 :: :: https://github.com/tamlut-modnys/template-hsl-abc-blocks @@ -323,7 +323,7 @@ _By ~dozreg-toplud. In the process, he found and fixed a bug in the implementat _By ~bantus-follus_ -``` +```hoon |= [blocks=(list (pair @t @t)) word=@t] =< =/ alphacheck (alphabet-check merged-blocks) @@ -413,7 +413,7 @@ spellcheck ### Solution #3 _By ~dannul-bortux_ -``` +```hoon !: |= [inlist=(list [@t @t]) inword=@t] ^- $?(%.y %.n) diff --git a/content/guides/additional/workbook/luhn-number.md b/content/guides/additional/workbook/luhn-number.md index 7dea772..52ec170 100644 --- a/content/guides/additional/workbook/luhn-number.md +++ b/content/guides/additional/workbook/luhn-number.md @@ -80,7 +80,7 @@ Some notes: Following a principle of test-driven development, we compose a series of tests which allow us to rigorously check for expected behavior. -``` +```hoon /+ *test /+ ln=luhn-number /= luhn-number /gen/luhn-number @@ -215,7 +215,7 @@ _These solutions were submitted by the Urbit community as part of a competition _By ~dozreg-toplud._ `lib/luhn-number.hoon` -``` +```hoon :: lib/luhn-number.hoon :: Library for HSL challenge #3 :: @@ -260,7 +260,7 @@ _By ~dozreg-toplud._ ``` `gen/luhn-number.hoon` -``` +```hoon :: gen/luhn-number.hoon :: Naked generator for HSL challenge #3 :: @@ -294,7 +294,7 @@ _By ~dozreg-toplud._ _By ~pardun-nollev._ `lib/luhn-number.hoon` -``` +```hoon |% ++ validate |= input=tape @@ -365,7 +365,7 @@ _By ~pardun-nollev._ `gen/luhn-number.hoon` -``` +```hoon /+ luhn-number |= input=tape =< @@ -402,7 +402,7 @@ _By ~motdeg-bintul_ `lib/luhn-number` -``` +```hoon :: lib/luhn-number.hoon :: Your code goes here :: @@ -487,7 +487,7 @@ $(count (add 1 count)) `gen/luhn-number` -``` +```hoon :: gen/luhn-number.hoon :: Your code goes here :: diff --git a/content/guides/additional/workbook/water-towers.md b/content/guides/additional/workbook/water-towers.md index 5446329..aaa236e 100644 --- a/content/guides/additional/workbook/water-towers.md +++ b/content/guides/additional/workbook/water-towers.md @@ -31,7 +31,7 @@ Example usage: Following a principle of test-driven development, we compose a series of tests which allow us to rigorously check for expected behavior. -``` +```hoon /+ *test /= water-towers /gen/water-towers |% @@ -94,7 +94,7 @@ _These solutions were submitted by the Urbit community as part of a competition _By ~dannul-bortux. A model for literate programming in Hoon._ -``` +```hoon :: :: A gate for computing volume of water collected between towers. :: @@ -262,7 +262,7 @@ _By ~dannul-bortux. A model for literate programming in Hoon._ ### Solution #2 _By ~racfer-hattes. A short and elegant solution._ -``` +```hoon => |% ++ go @@ -285,7 +285,7 @@ _By ~racfer-hattes. A short and elegant solution._ _By ~dozreg-toplud. Another very literate and clean solution._ -``` +```hoon :: +water-towers: a solution to the HSL challenge #1 :: :: https://github.com/tamlut-modnys/template-hsl-water-towers