Created
July 20, 2023 09:25
-
-
Save shubhamkumar13/b67b62b8658c45c683ea947653534827 to your computer and use it in GitHub Desktop.
recipe for pattern matching arrays in purescript
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
f l = case Array.uncons l of | |
Just {head,tail} -> handle non null case | |
Nothing -> handle null case |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment