Switch from markdown comments to hidden fences
This commit is contained in:
parent
32a8c6bd43
commit
24285db686
17 changed files with 94 additions and 94 deletions
|
@ -6,11 +6,11 @@ module Util.Digits
|
|||
import Data.Monoid.Exponentiation
|
||||
```
|
||||
|
||||
<!-- idris
|
||||
```idris hide
|
||||
import System
|
||||
|
||||
%default total
|
||||
-->
|
||||
```
|
||||
|
||||
This module provides views and associated functionality for treating `Integers`
|
||||
as if they were lists of numbers.
|
||||
|
@ -22,10 +22,10 @@ teaching purposes, we'll do it here, but please consider a library like
|
|||
[prim](https://github.com/stefan-hoeck/idris2-prim) if you find yourself needing
|
||||
to prove properties about primitive types.
|
||||
|
||||
<!-- idris
|
||||
```idris hide
|
||||
-- This mutual block isn't strictly required, but is useful for literate purposes
|
||||
mutual
|
||||
-->
|
||||
```
|
||||
|
||||
## Primitive functionality
|
||||
|
||||
|
@ -50,14 +50,14 @@ most significant digit.
|
|||
|
||||
For a clarifying example:
|
||||
|
||||
<!-- idris
|
||||
```idris hide
|
||||
-- @@test Ascending Digits Example
|
||||
ascendingExample : IO Bool
|
||||
ascendingExample = do
|
||||
putStrLn "Expecting: \{show [5, 4, 3, 2, 1]}"
|
||||
putStrLn "Got: \{show . ascList $ ascending 12345}"
|
||||
pure $
|
||||
-->
|
||||
```
|
||||
|
||||
```idris
|
||||
ascList (ascending 12345) == [5, 4, 3, 2, 1]
|
||||
|
@ -121,14 +121,14 @@ least significant digit.
|
|||
|
||||
For a clarifying example:
|
||||
|
||||
<!-- idris
|
||||
```idris hide
|
||||
-- @@test Descending Digits Example
|
||||
descendingExample : IO Bool
|
||||
descendingExample = do
|
||||
putStrLn "Expecting: \{show [1, 2, 3, 4, 5]}"
|
||||
putStrLn "Got: \{show . decList $ descending 12345}"
|
||||
pure $
|
||||
-->
|
||||
```
|
||||
|
||||
```idris
|
||||
decList (descending 12345) == [1, 2, 3, 4, 5]
|
||||
|
|
|
@ -36,7 +36,7 @@ data Level : Type where
|
|||
Other : (n : Nat) -> {auto _ : n `GT` 4} -> Level
|
||||
```
|
||||
|
||||
<!-- idris
|
||||
```idris hide
|
||||
export
|
||||
levelToNat : Level -> Nat
|
||||
levelToNat Err = 0
|
||||
|
@ -67,7 +67,7 @@ export infixl 8 >+
|
|||
export
|
||||
(>+) : Level -> Nat -> Level
|
||||
(>+) x k = natToLevel (k + levelToNat x)
|
||||
-->
|
||||
```
|
||||
|
||||
Convert a `Level` into a colorized tag
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue