Skip to content

Proposal: add tuple destructuring definition in LET/IN blocks #14

@ahelwer

Description

@ahelwer

Often I will have some function handling a tuple as an intermediate result. It would be nice to have some way to destructure it instead of having to use indices. It makes sense to add this as an additional definition type inside LET/IN blocks, like:

LET
  result == f[x]
  <<y, z>> == result
IN expr

This would semantically decompose to:

LET
  result == f[x]
  y == result[1]
  z == result[2]
IN expr

Tuple destructuring is present in set map/filter syntax, which is convenient, but it would be nice to have it when dealing with only a single value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions