We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 361de87 commit 0b14224Copy full SHA for 0b14224
pages/docs/manual/v12.0.0/variant.mdx
@@ -781,12 +781,15 @@ There's a linear amount of branch checking here (`O(n)`). Compare this to using
781
```res example
782
type animal = Dog | Cat | Bird
783
let data = Dog
784
-let logData = data => switch data {
785
-| Dog => Console.log("Wof")
786
-| Cat => Console.log("Meow")
787
-| Bird => Console.log("Kashiiin")
+let logData = data => {
+ switch data {
+ | Dog => Console.log("Wof")
+ | Cat => Console.log("Meow")
788
+ | Bird => Console.log("Kashiiin")
789
+ }
790
}
791
logData(data)
792
+
793
```
794
```js
795
function logData(data) {
0 commit comments