Skip to content

Commit 89b35d6

Browse files
committed
Make the code blocks nicer in REPL announcement
1 parent bfc4d0a commit 89b35d6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/pages/blog/announce/repl.elm

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ press `Ctrl-d`.
4343
4444
When you enter an expression, you get the result and its type:
4545
46-
```
46+
```elm
4747
> 1 + 1
4848
2 : number
4949
@@ -53,7 +53,7 @@ When you enter an expression, you get the result and its type:
5353
5454
The same can be done with definitions of values and functions:
5555
56-
```
56+
```elm
5757
> fortyOne = 41
5858
41 : number
5959
@@ -64,22 +64,22 @@ The same can be done with definitions of values and functions:
6464
42 : number
6565
6666
> factorial n = \\
67-
| if n < 1 then 1 \\
68-
| else n * factorial (n-1)
67+
| if n < 1 then 1 else n * factorial (n-1)
6968
<function> : number -> number
7069
7170
> factorial 5
7271
120 : number
7372
```
7473
75-
You can also define ADTs:
74+
You can also define union types:
7675
77-
```
78-
> data List a = Nil | Cons a (List a)
76+
```elm
77+
> type List a = Nil | Cons a (List a)
7978
80-
> isNil xs = case xs of \\
81-
| Nil -> True \\
82-
| Cons _ _ -> False
79+
> isNil xs = \\
80+
| case xs of \\
81+
| Nil -> True \\
82+
| Cons _ _ -> False
8383
<function> : List a -> Bool
8484
8585
> isNil Nil
@@ -90,7 +90,7 @@ You can also import standard libraries and any library reachable
9090
from the directory in which `elm-repl` is running. Let's say you
9191
are working on a module called `Graph`:
9292
93-
```
93+
```elm
9494
> import String
9595
9696
> String.length "hello"
@@ -153,4 +153,4 @@ which provided lots of great infrastructure for this project.
153153
154154
[repl-request]: https://groups.google.com/forum/#!searchin/elm-discuss/repl/elm-discuss/OqT-HjGCkyY/sGvDAcb8Y84J
155155
156-
"""
156+
"""

0 commit comments

Comments
 (0)