Skip to content

Commit d6b1926

Browse files
more formatting
1 parent 457bbb4 commit d6b1926

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

content/_index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Def Fizzbuzz (
1616
If Multiple of 15 then "fizzbuzz"
1717
If Multiple of 3 then "fizz"
1818
If Multiple of 5 then "buzz"
19-
else N
19+
else N
2020
);
2121
2222
For each in Range 1 to 100 (Print Fizzbuzz);
@@ -29,16 +29,16 @@ Cognate is a project aiming to create a human readable programming language with
2929
3030
Def Move discs as (
3131
32-
Let N be number of discs;
33-
Let A be first rod;
34-
Let B be second rod;
35-
Let C be third rod;
32+
Let N be number of discs;
33+
Let A be first rod;
34+
Let B be second rod;
35+
Let C be third rod;
3636
37-
Unless Zero? N (
38-
Move - 1 N discs from A via C to B;
39-
Prints ("Move disc " N " from " A " to " C);
40-
Move - 1 N discs from B via A to C;
41-
)
37+
Unless Zero? N (
38+
Move - 1 N discs from A via C to B;
39+
Prints ("Move disc " N " from " A " to " C);
40+
Move - 1 N discs from B via A to C;
41+
)
4242
);
4343
4444
Move 5 discs from "a" via "b" to "c";

content/learn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,17 @@ We can use variables to define functions that take named parameters -- here's an
129129

130130
```cognate
131131
Def Square as (
132-
Let X;
133-
* X X
132+
Let X;
133+
* X X
134134
);
135135
```
136136

137137
Notice that the last statement before a closing bracket does not need to be terminated with a semicolon. Also there is no return statement, since values are implicitly returned on the stack. This means we can actually define functions that return multiple values, such as the `Twin` function we saw earlier.
138138

139139
```cognate
140140
Def Twin as (
141-
Let X;
142-
X X
141+
Let X;
142+
X X
143143
);
144144
```
145145

0 commit comments

Comments
 (0)