book
This commit is contained in:
parent
2e9d1ac221
commit
d4e2b5338c
1
book/.gitignore
vendored
Normal file
1
book/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
book
|
14
book/book.toml
Normal file
14
book/book.toml
Normal file
@ -0,0 +1,14 @@
|
||||
[book]
|
||||
authors = ["Alisa Feistel"]
|
||||
language = "en"
|
||||
multilingual = false
|
||||
src = "src"
|
||||
title = "Monads in Rust"
|
||||
|
||||
[build]
|
||||
create-missing = false
|
||||
|
||||
[output.html]
|
||||
default-theme = "navy"
|
||||
mathjax-support = true
|
||||
git-repository-url = "https://gitea.parrrate.ru/PTV/radn-rs"
|
7
book/src/SUMMARY.md
Normal file
7
book/src/SUMMARY.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Summary
|
||||
|
||||
[Introduction](./ch00/s00-introduction.md)
|
||||
|
||||
- [Background](./ch01/s00-background.md)
|
||||
- [Implementation](./ch02/s00-implementation.md)
|
||||
- [Usage]()
|
1
book/src/ch00/s00-introduction.md
Normal file
1
book/src/ch00/s00-introduction.md
Normal file
@ -0,0 +1 @@
|
||||
# Introduction
|
1
book/src/ch01/s00-background.md
Normal file
1
book/src/ch01/s00-background.md
Normal file
@ -0,0 +1 @@
|
||||
# Background
|
1
book/src/ch02/s00-implementation.md
Normal file
1
book/src/ch02/s00-implementation.md
Normal file
@ -0,0 +1 @@
|
||||
# Implementation
|
@ -30,8 +30,9 @@ impl Functor for OptionClass {
|
||||
}
|
||||
|
||||
fn void<'a, A: 'a>(fa: Self::F<'a, A>) -> Self::F<'a, ()>
|
||||
where
|
||||
Self: 'a, {
|
||||
where
|
||||
Self: 'a,
|
||||
{
|
||||
fa?;
|
||||
Self::pure(())
|
||||
}
|
||||
@ -138,7 +139,7 @@ impl MonadFail<()> for OptionClass {
|
||||
fn fail<'a, A: 'a>(_e: ()) -> Self::F<'a, A>
|
||||
where
|
||||
Self: 'a,
|
||||
(): 'a {
|
||||
{
|
||||
None
|
||||
}
|
||||
}
|
||||
|
@ -33,8 +33,9 @@ impl<E> Functor for ResultClass<E> {
|
||||
}
|
||||
|
||||
fn void<'a, A: 'a>(fa: Self::F<'a, A>) -> Self::F<'a, ()>
|
||||
where
|
||||
Self: 'a, {
|
||||
where
|
||||
Self: 'a,
|
||||
{
|
||||
fa?;
|
||||
Self::pure(())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user