Merge pull request #411 from urbit/hsl-challenges-hoonwb

added hoon formatting to workbook challenges
This commit is contained in:
tamlut-modnys 2023-07-26 19:28:06 -04:00 committed by GitHub
commit 760194d9c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 15 deletions

View File

@ -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)

View File

@ -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
::

View File

@ -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