updated the system to work better with markdown
This commit is contained in:
parent
d18f1f25b0
commit
c6987ee81d
8 changed files with 88 additions and 1 deletions
|
@ -687,6 +687,34 @@ Haskell types is fractal:</p>
|
||||||
|
|
||||||
<img src="categories/img/mp/hask-endofunctor.png" alt="Haskell functor representation"/>
|
<img src="categories/img/mp/hask-endofunctor.png" alt="Haskell functor representation"/>
|
||||||
</section>
|
</section>
|
||||||
|
<section class="slide">
|
||||||
|
<h2 id="non-haskell-hasks-functors">"Non Haskell" Hask's Functors</h2>
|
||||||
|
<p>A simple basic example is the \(id_\Hask\) functor. It simply cannot be expressed as a couple (<code>F</code>,<code>fmap</code>) where</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>F::* -> *</code></li>
|
||||||
|
<li><code>fmap :: (a -> b) -> (F a) -> (F b)</code></li>
|
||||||
|
</ul>
|
||||||
|
<p>Also other degenerated examples:</p>
|
||||||
|
<ul>
|
||||||
|
<li>F(<code>T</code>)=<code>Int</code></li>
|
||||||
|
<li>F(<code>f</code>)=<code>\x->0</code></li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
<section class="slide">
|
||||||
|
<h2 id="also-functor-inside-hask">Also Functor inside \(\Hask\)</h2>
|
||||||
|
<p><code>length</code> can be seen as a Functor from the category <code>[a]</code> to <code>Int</code>. More precisely:</p>
|
||||||
|
<ul>
|
||||||
|
<li>\(\ob{\mathtt{[a]}}=\{∙\}\)</li>
|
||||||
|
<li>\(\hom{\mathtt{[a]}}=\mathtt{[a]}\)</li>
|
||||||
|
<li>\(∘=\mathtt{(++)}\)</li>
|
||||||
|
</ul>
|
||||||
|
<p><span class="and">&</span></p>
|
||||||
|
<ul>
|
||||||
|
<li>\(\ob{\mathtt{Int}}=\{∙\}\)</li>
|
||||||
|
<li>\(\hom{\mathtt{Int}}=\mathtt{Int}\)</li>
|
||||||
|
<li>\(∘=\mathtt{(+)}\)</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
<!-- End slides. -->
|
<!-- End slides. -->
|
||||||
|
|
||||||
|
|
||||||
|
|
6
categories/30_How/100_Functor_as_boxes.html
Normal file
6
categories/30_How/100_Functor_as_boxes.html
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<h2>Functor as boxes</h2>
|
||||||
|
|
||||||
|
<p>Haskell functor can be seen as boxes containing all Haskell types and functions.
|
||||||
|
Haskell types is fractal:</p>
|
||||||
|
|
||||||
|
<img src="categories/img/mp/hask-endofunctor-objects.png" alt="Haskell functor representation"/>
|
11
categories/30_How/110_Non_Haskell_Hask_s_Functors.html
Normal file
11
categories/30_How/110_Non_Haskell_Hask_s_Functors.html
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<h2 id="non-haskell-hasks-functors">"Non Haskell" Hask's Functors</h2>
|
||||||
|
<p>A simple basic example is the \(id_\Hask\) functor. It simply cannot be expressed as a couple (<code>F</code>,<code>fmap</code>) where</p>
|
||||||
|
<ul>
|
||||||
|
<li><code>F::* -> *</code></li>
|
||||||
|
<li><code>fmap :: (a -> b) -> (F a) -> (F b)</code></li>
|
||||||
|
</ul>
|
||||||
|
<p>Also other degenerated examples:</p>
|
||||||
|
<ul>
|
||||||
|
<li>F(<code>T</code>)=<code>Int</code></li>
|
||||||
|
<li>F(<code>f</code>)=<code>\x->0</code></li>
|
||||||
|
</ul>
|
12
categories/30_How/110_Non_Haskell_Hask_s_Functors.md
Normal file
12
categories/30_How/110_Non_Haskell_Hask_s_Functors.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
## "Non Haskell" Hask's Functors
|
||||||
|
|
||||||
|
A simple basic example is the \\(id\_\\Hask\\) functor.
|
||||||
|
It simply cannot be expressed as a couple (`F`,`fmap`) where
|
||||||
|
|
||||||
|
- `F::* -> *`
|
||||||
|
- `fmap :: (a -> b) -> (F a) -> (F b)`
|
||||||
|
|
||||||
|
Also other degenerated examples:
|
||||||
|
|
||||||
|
- F(`T`)=`Int`
|
||||||
|
- F(`f`)=`\_->0`
|
13
categories/30_How/120_Also_Functor_inside_Hask.html
Normal file
13
categories/30_How/120_Also_Functor_inside_Hask.html
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<h2 id="also-functor-inside-hask">Also Functor inside \(\Hask\)</h2>
|
||||||
|
<p><code>length</code> can be seen as a Functor from the category <code>[a]</code> to <code>Int</code>. More precisely:</p>
|
||||||
|
<ul>
|
||||||
|
<li>\(\ob{\mathtt{[a]}}=\{∙\}\)</li>
|
||||||
|
<li>\(\hom{\mathtt{[a]}}=\mathtt{[a]}\)</li>
|
||||||
|
<li>\(∘=\mathtt{(++)}\)</li>
|
||||||
|
</ul>
|
||||||
|
<p>&</p>
|
||||||
|
<ul>
|
||||||
|
<li>\(\ob{\mathtt{Int}}=\{∙\}\)</li>
|
||||||
|
<li>\(\hom{\mathtt{Int}}=\mathtt{Int}\)</li>
|
||||||
|
<li>\(∘=\mathtt{(+)}\)</li>
|
||||||
|
</ul>
|
14
categories/30_How/120_Also_Functor_inside_Hask.md
Normal file
14
categories/30_How/120_Also_Functor_inside_Hask.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
## Also Functor inside \\(\\Hask\\)
|
||||||
|
|
||||||
|
`length` can be seen as a Functor from the category `[a]` to `Int`.
|
||||||
|
More precisely:
|
||||||
|
|
||||||
|
- \\(\\ob{\\mathtt{[a]}}=\\{∙\\}\\)
|
||||||
|
- \\(\\hom{\\mathtt{[a]}}=\\mathtt{[a]}\\)
|
||||||
|
- \\(∘=\\mathtt{(++)}\\)
|
||||||
|
|
||||||
|
&
|
||||||
|
|
||||||
|
- \\(\\ob{\\mathtt{Int}}=\\{∙\\}\\)
|
||||||
|
- \\(\\hom{\\mathtt{Int}}=\\mathtt{Int}\\)
|
||||||
|
- \\(∘=\\mathtt{(+)}\\)
|
|
@ -14,7 +14,7 @@ for rep in ??_*(/); do
|
||||||
cd $rep
|
cd $rep
|
||||||
i=10
|
i=10
|
||||||
for fic in *.html; do
|
for fic in *.html; do
|
||||||
title=$( <$fic grep h2 | sed 's/<[^>]*>//g;s/[^a-zA-Z]/_/g;s/__*/_/g;s/^_//;s/_$//')
|
title=$( <$fic grep h2 | sed 's/<[^>]*>//g;s/&[^;]*;//g;s/[^a-zA-Z]/_/g;s/__*/_/g;s/^_//;s/_$//;')
|
||||||
if ((i<100)); then
|
if ((i<100)); then
|
||||||
num="0$i"
|
num="0$i"
|
||||||
else
|
else
|
||||||
|
@ -28,6 +28,9 @@ for rep in ??_*(/); do
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
mv $fic $newfic
|
mv $fic $newfic
|
||||||
|
mdfic=${fic:r}.md
|
||||||
|
newmdfic=${newfic:r}.md
|
||||||
|
[[ -e $mdfic ]] && mv $mdfic $newmdfic
|
||||||
done
|
done
|
||||||
cd $scriptdir
|
cd $scriptdir
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue