Skip to content

Commit d2a06dd

Browse files
more consistent semicolon usage in code examples
1 parent 759452c commit d2a06dd

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

content/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Def Fizzbuzz (
1919
else N
2020
);
2121
22-
For each in Range 1 to 100 (Print Fizzbuzz)
22+
For each in Range 1 to 100 (Print Fizzbuzz);
2323
```
2424

2525
Cognate is a project aiming to create a human readable programming language with as little syntax as possible. Where natural language programming usually uses many complex syntax rules, instead Cognate takes them away. What it adds is simple, a way to embed comments into statements.
@@ -41,7 +41,7 @@ Def Move discs as (
4141
)
4242
);
4343
44-
Move 5 discs from "a" via "b" to "c"
44+
Move 5 discs from "a" via "b" to "c";
4545
```
4646

4747
As you can see, Cognate ignores words starting with lowercase letters, allowing them to be used to describe functionality and enhance readability. This makes Cognate codebases intuitive and maintainable.
@@ -51,7 +51,7 @@ As you can see, Cognate ignores words starting with lowercase letters, allowing
5151
5252
Def Square as (* Twin);
5353
Map (Square) over Range 1 to 10;
54-
Print
54+
Print;
5555
```
5656

5757
Cognate is a stack-oriented programming language similar to Forth or Factor, except statements are evaluated right to left. This gives the expressiveness of concatenative programming as well as the readability of prefix notation. Statements can be delimited at arbitrary points, allowing them to read as sentences would in English.

content/learn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ Begin (
406406
Set I to + 1 of Unbox I;
407407
When == 101 Unbox I ( Break out of the begin );
408408
)
409-
)
409+
);
410410
```
411411

412412
This essentially allows any control flow to have a break statement, not just loops. `Begin` can also be used to implement a return statement to break out of a function early.
@@ -425,7 +425,7 @@ Def F (
425425
);
426426
Return Unbox X;
427427
)
428-
)
428+
);
429429
```
430430

431431
An advantage of `Begin` over traditional programming languages' break and return statements is that it gives fine-grained control over which block you break out of, since nested `Begin` statements can have their exit blocks bound to different names.

0 commit comments

Comments
 (0)