Skip to content

Instantly share code, notes, and snippets.

@shubhamkumar13
Created July 20, 2023 09:25
Show Gist options
  • Save shubhamkumar13/b67b62b8658c45c683ea947653534827 to your computer and use it in GitHub Desktop.
Save shubhamkumar13/b67b62b8658c45c683ea947653534827 to your computer and use it in GitHub Desktop.
recipe for pattern matching arrays in purescript
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