From 325d43c96c347551d57ba9dd2fc52269b5bb6d3d Mon Sep 17 00:00:00 2001 From: wwmmzz <270447914@qq.com> Date: Tue, 14 Mar 2023 23:23:11 +0800 Subject: [PATCH] feat: add gitbook #24 --- README.md | 2 +- website/docs/1. What is functional programming.md | 2 +- website/docs/10. Applicative functors.md | 2 +- website/docs/11. Monads.md | 2 +- .../docs/2. The two pillars of functional programming.md | 2 +- website/docs/3. Modelling composition with Semigroups.md | 2 +- website/docs/5. Modeling composition through Monoids.md | 2 +- website/docs/9. Functors.md | 2 +- website/docs/quiz-answers/semigroup-demo-concat.md | 2 +- website/docusaurus.config.js | 8 ++++---- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 6cfb77b..9b5c00a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The purpose of the edits is to expand on the material without changing the conce ## Read it Online -For a best reading experience, [read it online via Gitbook](https://wwmmzz.github.io/functional-programming/). +For a best reading experience, [read it online via Gitbook](https://enricopolanski.github.io/functional-programming/). - Quick-access side-bar - In-browser exercises diff --git a/website/docs/1. What is functional programming.md b/website/docs/1. What is functional programming.md index afc8e3d..a319b93 100644 --- a/website/docs/1. What is functional programming.md +++ b/website/docs/1. What is functional programming.md @@ -32,7 +32,7 @@ What happens here is that `input` is passed to the first function `f1`, which re **Demo** -[`00_pipe_and_flow.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/00_pipe_and_flow.ts) +[`00_pipe_and_flow.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/00_pipe_and_flow.ts) We'll see how functional programming provides us with tools to structure our code in that style. diff --git a/website/docs/10. Applicative functors.md b/website/docs/10. Applicative functors.md index bf8c9cd..88b4905 100644 --- a/website/docs/10. Applicative functors.md +++ b/website/docs/10. Applicative functors.md @@ -425,7 +425,7 @@ const of = (a: A): Reader => () => a **Demo** -[`05_applicative.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/05_applicative.ts) +[`05_applicative.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/05_applicative.ts) ## Applicative functors compose diff --git a/website/docs/11. Monads.md b/website/docs/11. Monads.md index 6226404..f80eb7d 100644 --- a/website/docs/11. Monads.md +++ b/website/docs/11. Monads.md @@ -829,4 +829,4 @@ program5(DepsAsync)().then(console.log) **Demo** -[`06_game.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/06_game.ts) +[`06_game.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/06_game.ts) diff --git a/website/docs/2. The two pillars of functional programming.md b/website/docs/2. The two pillars of functional programming.md index fe9faa9..e0967eb 100644 --- a/website/docs/2. The two pillars of functional programming.md +++ b/website/docs/2. The two pillars of functional programming.md @@ -139,7 +139,7 @@ Let's try to implement such a module: **Demo** -[`01_retry.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/01_retry.ts) +[`01_retry.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/01_retry.ts) As you can see from the previous demo, with merely 3 primitives and two combinators we've been able to express a pretty complex policy. diff --git a/website/docs/3. Modelling composition with Semigroups.md b/website/docs/3. Modelling composition with Semigroups.md index 99cafc1..f538113 100644 --- a/website/docs/3. Modelling composition with Semigroups.md +++ b/website/docs/3. Modelling composition with Semigroups.md @@ -184,7 +184,7 @@ const SemigroupSum: Semigroup = { } ``` -**Quiz**. Can the `concat` combinator defined in the demo [`01_retry.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/01_retry.ts) be used to define a `Semigroup` instance for the `RetryPolicy` type? +**Quiz**. Can the `concat` combinator defined in the demo [`01_retry.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/01_retry.ts) be used to define a `Semigroup` instance for the `RetryPolicy` type? > See the [answer here](quiz-answers/semigroup-demo-concat.md) diff --git a/website/docs/5. Modeling composition through Monoids.md b/website/docs/5. Modeling composition through Monoids.md index 2d31c9b..3490001 100644 --- a/website/docs/5. Modeling composition through Monoids.md +++ b/website/docs/5. Modeling composition through Monoids.md @@ -207,4 +207,4 @@ const Monoid: Monoid = tuple(N.MonoidSum, N.MonoidSum) **Demo** (implementing a system to draw geoetric shapes on canvas) -[`03_shapes.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/03_shapes.ts) +[`03_shapes.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/03_shapes.ts) diff --git a/website/docs/9. Functors.md b/website/docs/9. Functors.md index 8dd9ea1..f7e9c4c 100644 --- a/website/docs/9. Functors.md +++ b/website/docs/9. Functors.md @@ -464,7 +464,7 @@ Practically, using `Option`, we're always in front of the `happy path`, error ha **Demo** (optional) -[`04_functor.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/04_functor.ts) +[`04_functor.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/04_functor.ts) **Quiz**. `Task` represents an asynchronous call that always succeed, how can we model a computation that can fail instead? diff --git a/website/docs/quiz-answers/semigroup-demo-concat.md b/website/docs/quiz-answers/semigroup-demo-concat.md index 9c69bf9..0172c06 100644 --- a/website/docs/quiz-answers/semigroup-demo-concat.md +++ b/website/docs/quiz-answers/semigroup-demo-concat.md @@ -1,6 +1,6 @@ ## Question -Can the `concat` combinator defined in the demo [`01_retry.ts`](https://github.com/wwmmzz/functional-programming/blob/master/src/01_retry.ts) be used to define a `Semigroup` instance for the `RetryPolicy` type? +Can the `concat` combinator defined in the demo [`01_retry.ts`](https://github.com/enricopolanski/functional-programming/blob/master/src/01_retry.ts) be used to define a `Semigroup` instance for the `RetryPolicy` type? ## Answer diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 77f21ba..42f2ef2 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -11,14 +11,14 @@ const config = { favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://wwmmzz.github.io', + url: 'https://enricopolanski.github.io', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/functional-programming/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'wwmmzz', // Usually your GitHub org/user name. + organizationName: 'enricopolanski', // Usually your GitHub org/user name. projectName: 'functional-programming', // Usually your repo name. trailingSlash:false, @@ -44,7 +44,7 @@ const config = { // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: - 'https://github.com/wwmmzz/functional-programming/blob/master/website', + 'https://github.com/enricopolanski/functional-programming/blob/master/website', }, blog: false, theme: { @@ -63,7 +63,7 @@ const config = { items: [ { - href: 'https://github.com/wwmmzz/functional-programming', + href: 'https://github.com/enricopolanski/functional-programming', position: 'right', className: 'header-github-link', },