Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a5c8aef
trying to rewrite typeclasses-new
Jan 6, 2020
1bd517e
Wrap the last sentence in a whole "summary" section to avoid stray text
Jan 31, 2020
171a09a
Step2: rewrite the Functor part in more details
Jan 31, 2020
6b7e497
Step3: rewrite the Monad part (apart from the Reader monad)
Jan 31, 2020
74ff540
Fix typos
Jan 31, 2020
8118ed7
Rephrase assertTransformation simplification
Jan 31, 2020
a076eea
Fix typos on the reader monad
Jan 31, 2020
66ebcfb
@bishabosha's note
Jan 31, 2020
334c4b4
attempt at explaining the reader monad
Jan 31, 2020
cd501b6
less concrete and more accurate definition of a Functor
aesteve Jan 31, 2020
ff7ca15
definition of A functor, not THE functor ability
aesteve Jan 31, 2020
cf29e82
A functor for the type constructor F[_]
aesteve Jan 31, 2020
8607014
better phrasing for abstracting away Config
aesteve Jan 31, 2020
4c81c46
parameterised type with abstract members => trait
aesteve Jan 31, 2020
6b6cd39
oo polymorphism vs. parametric polymorphism
aesteve Jan 31, 2020
c6ec581
explaining the difference between OO polymorphism and ad-hoc polymorp…
aesteve Jan 31, 2020
716ae0c
better phrasing for conclusion
aesteve Jan 31, 2020
c15cd63
remove the "we don't care" part
aesteve Jan 31, 2020
8b85b34
using F as a substitution for every type that ca be mapped over
aesteve Jan 31, 2020
86615f6
Merge remote-tracking branch 'upstream/master' into doc/rework-typecl…
Feb 9, 2020
f2d7a6d
Merge remote-tracking branch 'origin/doc/rework-typeclasses-new' into…
Feb 9, 2020
df15a24
Trying to add an easy-to-grasp definition of type classes
Feb 9, 2020
4b04603
Proper 0.23 syntax
Feb 10, 2020
cb6c511
Proper 0.23 syntax
Feb 10, 2020
cd9834e
typo
Feb 10, 2020
bf7b005
no longer `given as`
Feb 10, 2020
9c1509b
typeclasses-new.md is now typeclasses.md
Feb 13, 2020
466bff9
Adapt to 0.23 latest
Feb 26, 2020
219bc3c
Use new type wildcard syntax
Mar 30, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
A functor for the type constructor F[_]
Co-Authored-By: Jamie Thompson <bishbashboshjt@gmail.com>
  • Loading branch information
aesteve and bishabosha authored Jan 31, 2020
commit cf29e827863e1b5f8d06e7e9ac43ed2ac0bd439b
2 changes: 1 addition & 1 deletion docs/docs/reference/contextual/typeclasses-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ trait Functor[F[_]] {
}
```

Which could read as follows: "The `Functor` ability for a wrapper type `F` represents the ability to transform `F[A]` to `F[B]` through the application of the `mapper` function whose type is `A => B`".
Which could read as follows: "A `Functor` for the type constructor `F[_]` represents the ability to transform `F[A]` to `F[B]` through the application of the `mapper` function whose type is `A => B`". We call the `Functor` definition here a _typeclass_.
This way, we could define an instance of `Functor` for the `List` type:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This way, we could define an instance of `Functor` for the `List` type:
This way, we could define an instance of `Functor` for the `List` type constructor:

```scala
Expand Down