case ${var} of
        ${alt:Just a} -> ${body}
        ${otehrwise:_} -> ${remaining}

      Haskell language logo
      case

      Haskell public recipes

      esac

      The code looks for a match in the string ${var} against the pattern Just a. If there is a match, the code executes the body. Otherwise, the code prints the remaining text.

      Shortcut: case

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.