Skip to content

Commit

Permalink
minor docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
simvux committed Sep 5, 2024
1 parent 1680619 commit 1f8878a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions mdbook/src/features/partial.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ fn add x y as int, int -> int = x + y
// fn(int, int -> int)
#add
// partially applicates the function to create a closure with one less parameter
// partially applys the function to create a closure with one less parameter
// fn(int -> int)
#(add 5)
// partially applicates an operator to create a closure with a single parameter
// partially applys an operator to create a closure with a single parameter
// fn(int -> int)
#(+ 5)
Expand Down Expand Up @@ -85,11 +85,11 @@ fn add_five_if_just m as Maybe int -> Maybe int =
change_if_just #(\n -> n + 5) m
```

**Partially applicating Where-Bindings**
**Partially applys Where-Bindings**

<sup>*TODO: Is it overly complicated and confusing to explain this here? Maybe we should have a separate design patterns chapter*</sup>

A common design pattern is to partially applicate where-bindings
A common design pattern is to partially apply where-bindings

```lm
fn add_five_if_just m as Maybe int -> Maybe int =
Expand Down
9 changes: 7 additions & 2 deletions mdbook/src/features/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,25 @@

The `bool` type has either the value `true` or `false`

**Arrays**

Arrays are planned but currently not exposed to the user.

**Prelude**

The following types aren't builtins but are available in prelude by default.

```lm
type string
type List a // [a]
type string // utf-8 encoded bytes
type List a // (or [a]) an efficient dynamic list
type Maybe a
type Result a err
type nothing
trait Num
trait Compare
trait ToString
```
<sup><sub>&nbsp;&nbsp;&nbsp;&nbsp; `string` is incomplete and not yet validated as utf-8</sub></sup>

## Record types

Expand Down

0 comments on commit 1f8878a

Please sign in to comment.