Last active
November 15, 2022 18:25
-
-
Save farukg/cf62675b46c4c811f1a1b523c712b46d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type connType = Wifi | |
type login = | |
| Admin | |
| Regular | |
type connected = { | |
connType, | |
login, | |
} | |
type conn = | |
| Connected(connected) | |
| NoConnection | |
let anyFunction = | |
fun | |
| Connected({connType: Wifi, login: Admin}) => seeAdminPanel() | |
| Connected({connType: Wifi, login: Regular}) => debugPrint("Must be admin...") | |
| NoConnection => debugPrint("Must be connected and logged in...") |
Author
farukg
commented
Nov 15, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment