From 10181ab5f66350ac7046ca7a6a25c3aac9eeecfa Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Thu, 28 Mar 2024 14:18:41 +0100 Subject: [PATCH] grammar fixes --- docs/docs/lips/REPL.md | 2 +- docs/docs/lips/extension.md | 2 +- docs/docs/lips/functional-helpers.md | 4 ++-- docs/docs/lips/intro.md | 6 +++--- docs/docs/lips/reflection.md | 2 +- docs/docs/lips/sxml.md | 2 +- docs/docs/scheme-intro/continuations.md | 2 +- docs/docs/scheme-intro/macros.md | 6 +++--- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/docs/lips/REPL.md b/docs/docs/lips/REPL.md index 696319ad0..bf0475433 100644 --- a/docs/docs/lips/REPL.md +++ b/docs/docs/lips/REPL.md @@ -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). diff --git a/docs/docs/lips/extension.md b/docs/docs/lips/extension.md index aea844985..d3148e87e 100644 --- a/docs/docs/lips/extension.md +++ b/docs/docs/lips/extension.md @@ -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) diff --git a/docs/docs/lips/functional-helpers.md b/docs/docs/lips/functional-helpers.md index 8f25b129c..2b73c665e 100644 --- a/docs/docs/lips/functional-helpers.md +++ b/docs/docs/lips/functional-helpers.md @@ -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: @@ -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?))) diff --git a/docs/docs/lips/intro.md b/docs/docs/lips/intro.md index 06955018a..1c303bde4 100644 --- a/docs/docs/lips/intro.md +++ b/docs/docs/lips/intro.md @@ -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 @@ -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 @@ -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. diff --git a/docs/docs/lips/reflection.md b/docs/docs/lips/reflection.md index 97485f726..2d730f9c7 100644 --- a/docs/docs/lips/reflection.md +++ b/docs/docs/lips/reflection.md @@ -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 diff --git a/docs/docs/lips/sxml.md b/docs/docs/lips/sxml.md index 939364699..479541fda 100644 --- a/docs/docs/lips/sxml.md +++ b/docs/docs/lips/sxml.md @@ -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 diff --git a/docs/docs/scheme-intro/continuations.md b/docs/docs/scheme-intro/continuations.md index c8ef8fb5b..c47f56c6d 100644 --- a/docs/docs/scheme-intro/continuations.md +++ b/docs/docs/scheme-intro/continuations.md @@ -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 )` 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: diff --git a/docs/docs/scheme-intro/macros.md b/docs/docs/scheme-intro/macros.md index 84847d2ee..6282cd651 100644 --- a/docs/docs/scheme-intro/macros.md +++ b/docs/docs/scheme-intro/macros.md @@ -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 @@ -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) @@ -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.