Skip to content

Commit 0b90c49

Browse files
proskiulysses4ever
authored andcommitted
Fix typos found by codespell
1 parent 91e9ea8 commit 0b90c49

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

markdown/source_md/functors-applicative-functors-and-monoids.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ True
10471047
It turns a list with the type `(Num a) => [a -> Bool]` into a function with the type `(Num a) => a -> [Bool]`.
10481048
Pretty neat, huh?
10491049

1050-
Because lists are homogenous, all the functions in the list have to be functions of the same type, of course.
1050+
Because lists are homogeneous, all the functions in the list have to be functions of the same type, of course.
10511051
You can't have a list like `[ord, (+3)]`, because `ord` takes a character and returns a number, whereas `(+3)` takes a number and returns a number.
10521052

10531053
When used with `[]`, `sequenceA` takes a list of lists and returns a list of lists.
@@ -1642,7 +1642,7 @@ instance Num a => Monoid (Product a) where
16421642
`mappend` pattern matches on the `Product` constructor, multiplies the two numbers and then wraps the resulting number back.
16431643
As you can see, there's a `Num a` class constraint.
16441644
So this means that `Product a` is an instance of `Monoid` for all `a`'s that are already an instance of `Num`.
1645-
To use `Producta a` as a monoid, we have to do some *newtype* wrapping and unwrapping:
1645+
To use `Product a` as a monoid, we have to do some *newtype* wrapping and unwrapping:
16461646

16471647
```{.haskell:hs}
16481648
ghci> getProduct $ Product 3 `mappend` Product 9

markdown/source_md/higher-order-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ The lambda function `(\acc x -> acc + x)` is the same as `(+)`.
617617
We can omit the `xs` as the parameter because calling `foldl (+) 0` will return a function that takes a list.
618618
Generally, if you have a function like `foo a = bar b a`, you can rewrite it as `foo = bar b`, because of currying.
619619

620-
Anyhoo, let's implement another function with a left fold before moving on to right folds.
620+
Anyhow, let's implement another function with a left fold before moving on to right folds.
621621
I'm sure you all know that `elem` checks whether a value is part of a list so I won't go into that again (whoops, just did!).
622622
Let's implement it with a left fold.
623623

markdown/source_md/input-and-output.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ Pure code can throw exceptions, but they can only be caught in the I/O part of o
20712071
That's because you don't know when (or if) anything will be evaluated in pure code, because it is lazy and doesn't have a well-defined order of execution, whereas I/O code does.
20722072

20732073
Earlier, we talked about how we should spend as little time as possible in the I/O part of our program.
2074-
The logic of our program should reside mostly within our pure functions, because their results are dependant only on the parameters that the functions are called with.
2074+
The logic of our program should reside mostly within our pure functions, because their results are dependent only on the parameters that the functions are called with.
20752075
When dealing with pure functions, you only have to think about what a function returns, because it can't do anything else.
20762076
This makes your life easier.
20772077
Even though doing some logic in I/O is necessary (like opening files and the like), it should preferably be kept to a minimum.

markdown/source_md/starting-out.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ It's the most used data structure and it can be used in a multitude of different
286286
Lists are SO awesome.
287287
In this section we'll look at the basics of lists, strings (which are lists) and list comprehensions.
288288

289-
In Haskell, lists are a **homogenous** data structure.
289+
In Haskell, lists are a **homogeneous** data structure.
290290
They store several elements of the same type.
291291
That means that we can have a list of integers or a list of characters but we can't have a list that has a few integers and then a few characters.
292292
And now, a list!
@@ -771,7 +771,7 @@ That's its type and it doesn't matter if it has only one number in it or an infi
771771
Tuples, however, are used when you know exactly how many values you want to combine and its type depends on how many components it has and the types of the components.
772772
They are denoted with parentheses and their components are separated by commas.
773773

774-
Another key difference is that they don't have to be homogenous.
774+
Another key difference is that they don't have to be homogeneous.
775775
Unlike a list, a tuple can contain a combination of several types.
776776

777777
Think about how we'd represent a two-dimensional vector in Haskell.

0 commit comments

Comments
 (0)