Skip to content

Commit

Permalink
grammar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 28, 2024
1 parent d295c24 commit 10181ab
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/docs/lips/REPL.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ There are few procedures useful in the REPL:
* `dir` - function return all properties from an object including those in prototype chain (a class).
* `repr` - function return representation of the object as a string, it's inspired by Python. The
`repr` function accepts two arguments the second one is a boolean that indicate if it should work
like write or like display. Write will write string with quotes. So if you wnat the strings inside
like write or like display. Write will write string with quotes. So if you want the strings inside
the string to be quoted use `(repr obj #t)`

To read more about introspection of LIPS Scheme in REPL, see [documentation about Reflection](/docs/lips/reflection).
2 changes: 1 addition & 1 deletion docs/docs/lips/extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ broken test case.

LIPS Scheme define those extensions to syntax-rules macros:

* [SRFI-46](https://srfi.schemers.org/srfi-46/srfi-46.html) (chaning ellipsis symbol: see
* [SRFI-46](https://srfi.schemers.org/srfi-46/srfi-46.html) (changing ellipsis symbol: see
[Nested Hygienic Macros](/docs/scheme-intro/macros#nested-hygienic-macros)
* [SRFI-139](https://srfi.schemers.org/srfi-139/srfi-139.html) see
[Syntax Parameters](/docs/scheme-intro/macros#anaphoric-hygienic-macros)
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/lips/functional-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Another thing you can do is curry the take procedure to get only two elements fr
```

## Unary, binary, and n-ary
With LIPS you can change the arrity of the function by forcing only specific number of arguments.
With LIPS you can change the arity of the function by forcing only specific number of arguments.

This is a classic error:

Expand Down Expand Up @@ -249,7 +249,7 @@ all elemebts (`every`).

## pipe

Pipe is higher ordder procedure that accept functions and aguments and return a new function that apply those function in order:
Pipe is higher ordder procedure that accept functions as arguments and return a new function that apply those function in order:

```scheme
(define non-zero (curry filter (complement zero?)))
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/lips/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ It also implements:

### Gensyms
With lisp macros you can use [gensyms](/docs/scheme-intro/macros#gensyms), they are special Scheme
symbols that use JavaScript symbols behind the sceen, so they are proven to be unique. Additionally
symbols that use JavaScript symbols behind the scene, so they are proven to be unique. Additionally
you can use named gensym if you pass string as first argument:

```scheme
Expand Down Expand Up @@ -760,7 +760,7 @@ You can also have finally expression:
;; ==> nothing happened
```

You can also define finaly with `catch`:
You can also define `finally` without `catch`:

```scheme
(try
Expand Down Expand Up @@ -952,5 +952,5 @@ $ lips -c file.xcb
Will create `file.xcb` in same directory. For smaller files it make not have a difference when
loading `.xcb` or `.scm` files.

**NOTE**: directives `#!fold-case` and `#!no-fold-case` work only inside the parser and they are threated
**NOTE**: directives `#!fold-case` and `#!no-fold-case` work only inside the parser and they are treated
as comments, so you can't compile the code that have those directives.
2 changes: 1 addition & 1 deletion docs/docs/lips/reflection.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ source code of the procedure that you can modify:
(set-cdr! r (list (+ (cadr r) 1)))))
```

This procedure modify its source code. Each tiem you execute this function it will run one more
This procedure modify its source code. Each time you execute this function it will run one more
times.

```scheme
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/lips/sxml.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Remember to use `list->array` (or `list->vector`) if you process lists.

## Using SXML with React and Preact

To use SXML with React you need to specificy the main function that is used to create tags in JSX.
To use SXML with React you need to specify the main function that is used to create tags in JSX.
In Preact is `preact.h` and in React it's `React.createElement`. Here is a required setup for the

```scheme
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/scheme-intro/continuations.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can save continuation inside a variable and call it later like a procedure.
```

Here when you call a continuation `k` with value 10 it restores the state in `(+ 1 <slot>)` and
execute tht expression again with a value `10`.
execute that expression again with a value `10`.

The continuation act like a procedure and return `#t` with `procedure?` predicate:

Expand Down
6 changes: 3 additions & 3 deletions docs/docs/scheme-intro/macros.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ and use part of the pattern in output macro.

the first element of the pattern is often `_` it matches against the name of the macro.

### Elipsis
### Ellipsis

In lisp macros if you wanted to define a list of any values (including no values) you use
[improper list](/docs/scheme-intro/data-types#improper-list) (list with dot). In syntax-rules
Expand Down Expand Up @@ -517,7 +517,7 @@ recursve case.
(cons (cons x y) (alist z ...)))))
```

Here is example of recusive macro that expand into series of `cons`. You can use this macro like this:
Here is example of recursive macro that expand into series of `cons`. You can use this macro like this:

```scheme
(alist 'foo 10 'bar 20 'baz 30)
Expand All @@ -531,7 +531,7 @@ expact into series of `cons`:
(macroexpand '(alist 'foo 10 'bar 20 'baz 30))
;; ==> (#:cons (#:cons (quote foo) 10) (#:cons (#:cons (quote bar) 20) (#:cons (#:cons (quote baz) 30) ())))
```
The output may be different depening on implementation.
The output may be different depending on implementation.

### Anaphoric Hygienic Macros
By default Scheme `syntax-rules` macros don't allow creating anaphoric macros like lisp macro do.
Expand Down

0 comments on commit 10181ab

Please sign in to comment.