on master help sign in
temporarily switch to old style in REPL hints
commit9d97114702bf6846cab622a2203f60c2d4ebedf2 authorEvan Czaplicki <evancz@users.noreply.github.com> dateSat 20 Jul 2019, 16:28 (7 years ago) parent66dd7f1
1 file changed+4−13
hints/repl.md+4−13
hints/repl.md+4−13
@@ -28,26 +28,17 @@ The same can be done with definitions and custom types:
2828> increment 41
292942 : number
3030
31−> factorial n =
32−| if n < 1 then
33−| 1
34−| else
35−| n * factorial (n-1)
36−|
31+> factorial n = if n < 1 then 1 else n * factorial (n-1)
3732<function> : number -> number
3833
3934> factorial 5
4035120 : number
4136
42−> type User
43−| = Regular String
44−| | Visitor String
45−|
37+> type User = Regular String | Visitor String
4638
47−> case Regular "Tom" of
48−| Regular name -> "Hey again!"
39+> case Regular "Tom" of \
40+| Regular name -> "Hey again!" /
4941| Visitor name -> "Nice to meet you!"
50−|
5142"Hey again!" : String
5243```
5344