on master help sign in
Revert "temporarily switch to old style in REPL hints"
7089aeeEvan Czaplicki
hints/repl.md+13−4
@@ -28,17 +28,26 @@ The same can be done with definitions and custom types:
28> increment 41
28> increment 41
2942 : number
2942 : number
30
30
31+> factorial n =
32+| if n < 1 then
33+| 1
34+| else
31−> factorial n = if n < 1 then 1 else n * factorial (n-1)
35+| n * factorial (n-1)
36+|
32<function> : number -> number
37<function> : number -> number
33
38
34> factorial 5
39> factorial 5
35120 : number
40120 : number
36
41
42+> type User
37−> type User = Regular String | Visitor String
43+| = Regular String
44+| | Visitor String
45+|
38
46
39−> case Regular "Tom" of \
47+> case Regular "Tom" of
40−| Regular name -> "Hey again!" /
48+| Regular name -> "Hey again!"
41| Visitor name -> "Nice to meet you!"
49| Visitor name -> "Nice to meet you!"
50+|
42"Hey again!" : String
51"Hey again!" : String
43```
52```
44
53