From c6987ee81d502fe49fe7f954f11049fcc465a225 Mon Sep 17 00:00:00 2001 From: Yann Esposito Date: Tue, 20 Nov 2012 12:17:25 +0100 Subject: [PATCH] updated the system to work better with markdown --- categories.html | 28 +++++++++++++++++++ ....html => 080_Programming_Abstraction.html} | 0 categories/30_How/100_Functor_as_boxes.html | 6 ++++ .../110_Non_Haskell_Hask_s_Functors.html | 11 ++++++++ .../30_How/110_Non_Haskell_Hask_s_Functors.md | 12 ++++++++ .../30_How/120_Also_Functor_inside_Hask.html | 13 +++++++++ .../30_How/120_Also_Functor_inside_Hask.md | 14 ++++++++++ categories/renameSlideFic.sh | 5 +++- 8 files changed, 88 insertions(+), 1 deletion(-) rename categories/10_Introduction/{080_Programming_amp_Abstraction.html => 080_Programming_Abstraction.html} (100%) create mode 100644 categories/30_How/100_Functor_as_boxes.html create mode 100644 categories/30_How/110_Non_Haskell_Hask_s_Functors.html create mode 100644 categories/30_How/110_Non_Haskell_Hask_s_Functors.md create mode 100644 categories/30_How/120_Also_Functor_inside_Hask.html create mode 100644 categories/30_How/120_Also_Functor_inside_Hask.md diff --git a/categories.html b/categories.html index 0439b99..3b85e4a 100644 --- a/categories.html +++ b/categories.html @@ -687,6 +687,34 @@ Haskell types is fractal:

Haskell functor representation +
+

"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

+ +

Also other degenerated examples:

+ +
+
+

Also Functor inside \(\Hask\)

+

length can be seen as a Functor from the category [a] to Int. More precisely:

+ +

&

+ +
diff --git a/categories/10_Introduction/080_Programming_amp_Abstraction.html b/categories/10_Introduction/080_Programming_Abstraction.html similarity index 100% rename from categories/10_Introduction/080_Programming_amp_Abstraction.html rename to categories/10_Introduction/080_Programming_Abstraction.html diff --git a/categories/30_How/100_Functor_as_boxes.html b/categories/30_How/100_Functor_as_boxes.html new file mode 100644 index 0000000..a258bde --- /dev/null +++ b/categories/30_How/100_Functor_as_boxes.html @@ -0,0 +1,6 @@ +

Functor as boxes

+ +

Haskell functor can be seen as boxes containing all Haskell types and functions. +Haskell types is fractal:

+ +Haskell functor representation diff --git a/categories/30_How/110_Non_Haskell_Hask_s_Functors.html b/categories/30_How/110_Non_Haskell_Hask_s_Functors.html new file mode 100644 index 0000000..11f8be1 --- /dev/null +++ b/categories/30_How/110_Non_Haskell_Hask_s_Functors.html @@ -0,0 +1,11 @@ +

"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

+ +

Also other degenerated examples:

+ diff --git a/categories/30_How/110_Non_Haskell_Hask_s_Functors.md b/categories/30_How/110_Non_Haskell_Hask_s_Functors.md new file mode 100644 index 0000000..ab693c3 --- /dev/null +++ b/categories/30_How/110_Non_Haskell_Hask_s_Functors.md @@ -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` diff --git a/categories/30_How/120_Also_Functor_inside_Hask.html b/categories/30_How/120_Also_Functor_inside_Hask.html new file mode 100644 index 0000000..d1c0ff1 --- /dev/null +++ b/categories/30_How/120_Also_Functor_inside_Hask.html @@ -0,0 +1,13 @@ +

Also Functor inside \(\Hask\)

+

length can be seen as a Functor from the category [a] to Int. More precisely:

+ +

&

+ diff --git a/categories/30_How/120_Also_Functor_inside_Hask.md b/categories/30_How/120_Also_Functor_inside_Hask.md new file mode 100644 index 0000000..b9cac62 --- /dev/null +++ b/categories/30_How/120_Also_Functor_inside_Hask.md @@ -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{(+)}\\) diff --git a/categories/renameSlideFic.sh b/categories/renameSlideFic.sh index d06c32a..2880697 100755 --- a/categories/renameSlideFic.sh +++ b/categories/renameSlideFic.sh @@ -14,7 +14,7 @@ for rep in ??_*(/); do cd $rep i=10 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 num="0$i" else @@ -28,6 +28,9 @@ for rep in ??_*(/); do continue } mv $fic $newfic + mdfic=${fic:r}.md + newmdfic=${newfic:r}.md + [[ -e $mdfic ]] && mv $mdfic $newmdfic done cd $scriptdir done