Menu

#407 Pattern matching in ae

3.10
closed-fixed
None
5
2025-05-13
2024-12-20
No

Following [feature-requests:#403], users can write ident=expr to pick the name used by ae for the new variable.
Some users now request to extend the feature by allowing patterns instead of a single identifier:

  • when the expression's type is a product, the pattern would use ↦, for example (a ↦ b) ↦ (c ↦ d) = expr (similarly to the parameters of lambdas)
  • when the expression's type is a datatype with a single constructor, to name the constructor's arguments, for example cons(a, b, c) = expr

Related

Feature Requests: #403

Discussion

  • Guillaume Verdier

    • Group: unplanned --> 3.10
     
  • Guillaume Verdier

    • status: open --> closed-fixed
     
  • Guillaume Verdier

    It has been implemented and merged in commit [1048bd].

     

    Related

    Commit: [1048bd]


Log in to post a comment.

MongoDB Logo MongoDB