2024-07-10 17:46:18 +03:00
|
|
|
``` unison
|
2024-02-01 05:05:13 +03:00
|
|
|
{{ Type doc }}
|
|
|
|
structural type Optional a =
|
|
|
|
None
|
|
|
|
| Some a
|
|
|
|
|
|
|
|
{{
|
|
|
|
Multi line
|
|
|
|
|
|
|
|
Term doc
|
|
|
|
}}
|
|
|
|
List.map :
|
|
|
|
(a -> b)
|
|
|
|
-> [a]
|
|
|
|
-> [b]
|
|
|
|
List.map f = cases
|
|
|
|
(x +: xs) -> f x +: List.map f xs
|
|
|
|
[] -> []
|
|
|
|
|
|
|
|
test> z = let
|
|
|
|
x = "hello"
|
|
|
|
y = "world"
|
|
|
|
[Ok (x ++ y)]
|
|
|
|
```
|
|
|
|
|
2024-07-10 19:17:15 +03:00
|
|
|
``` ucm
|
2024-06-12 01:22:09 +03:00
|
|
|
scratch/main> debug.lsp.fold-ranges
|
2024-02-01 05:05:13 +03:00
|
|
|
|
|
|
|
《{{ Type doc }}》
|
|
|
|
《structural type Optional a =
|
|
|
|
None
|
|
|
|
| Some a》
|
|
|
|
|
|
|
|
《{{
|
|
|
|
Multi line
|
|
|
|
|
|
|
|
Term doc
|
|
|
|
}}》
|
|
|
|
《List.map :
|
|
|
|
(a -> b)
|
|
|
|
-> [a]
|
|
|
|
-> [b]
|
|
|
|
List.map f = cases
|
|
|
|
(x +: xs) -> f x +: List.map f xs
|
|
|
|
[] -> []》
|
|
|
|
|
|
|
|
《test> z = let
|
|
|
|
x = "hello"
|
|
|
|
y = "world"
|
|
|
|
[Ok (x ++ y)]》
|
|
|
|
|
|
|
|
```
|