Fix numerous typos

Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
This commit is contained in:
Danila Fedorin
2025-10-02 17:55:57 -07:00
parent 985763d19c
commit 9c24aac627
2 changed files with 14 additions and 14 deletions

View File

@@ -62,7 +62,7 @@ Daniel Fedorin, HPE
* Compile-time operations do not have mutable state.
- Cannot change values of `param` or `type` variables.
* Chapel's compile-time programming does not support loops.
- `param` loops are kind of an aception, but are simply unrolled.
- `param` loops are kind of an exception, but are simply unrolled.
- Without mutability, this unrolling doesn't give us much.
* Without state, our `type` and `param` functions are pure.
@@ -103,7 +103,7 @@ Without mutability and loops, Haskell programmers use pattern-matching and recur
# Evaluating Haskell
Haskell simplifies calls to functions by pickign the case based on the arguments.
Haskell simplifies calls to functions by picking the case based on the arguments.
```Haskell
sum (Cons 1 (Cons 2 (Cons 3 Nil)))
@@ -251,7 +251,7 @@ y(t_0+h) & \approx y_0 + h \times y'(t_0) \\
\end{align*}
$$
We can name the the first approximated $y$-value $y_1$, and set it:
We can name the first approximated $y$-value $y_1$, and set it:
$$
y_1 = y_0 + h \times f(t_0, y_0)
@@ -606,7 +606,7 @@ More work could be done to support more format specifiers, escapes, etc., but th
# Algebraic Data Types
* The kinds of data types that Haskell supports are called *algebraic data types*.
* At a fundamental level, they can be built up from two operations: _cartesian product_ and _disjoint union_.
* At a fundamental level, they can be built up from two operations: _Cartesian product_ and _disjoint union_.
* There are other concepts to build recursive data types, but we won't need them in Chapel.
- To prove to you I know what I'm talking about, some jargon:
_initial algebras_, _the fixedpoint functor_, _catamorphisms_...
@@ -622,7 +622,7 @@ li:nth-child(3) { color: lightgrey; }
# Algebraic Data Types
- The kinds of data types that Haskell supports are called *algebraic data types*.
- At a fundamental level, they can be built up from two operations: _cartesian product_ and _disjoint union_.
- At a fundamental level, they can be built up from two operations: _Cartesian product_ and _disjoint union_.
- There are other concepts to build recursive data types, but we won't need them in Chapel.
- To prove to you I know what I'm talking about, some jargon:
_initial algebras_, _the fixedpoint functor_, _catamorphisms_...
@@ -632,7 +632,7 @@ li:nth-child(3) { color: lightgrey; }
---
# Cartesian Product
For any two types, the _cartesian product_ of these two types defines all pairs of values from these types.
For any two types, the _Cartesian product_ of these two types defines all pairs of values from these types.
- This is like a two-element tuple _at the value level_ in Chapel.
- We write this as $A \times B$ for two types $A$ and $B$.
- In (type-level) Chapel and Haskell:
@@ -698,7 +698,7 @@ For any two types, the _disjoint union_ of these two types defines values that a
# Algebraic Data Types
* We can build up more compelx types by combining these two operations.
* We can build up more complex types by combining these two operations.
* Need a triple of types $A$, $B$, and $C$? Use $A \times (B \times C)$.
* Similarly, "any one of three types" can be expressed as $A + (B + C)$.
* A `Result<T>` type (in Rust, or `optional<T>` in C++) is $T + \text{Unit}$.