Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement standard list operations #107

Open
vvergu opened this issue Nov 7, 2016 · 3 comments
Open

Implement standard list operations #107

vvergu opened this issue Nov 7, 2016 · 3 comments

Comments

@vvergu
Copy link
Member

vvergu commented Nov 7, 2016

Let's try to add the following standard list operations to DynSem:

  • map L -map-> V or L -map(default)-> V
  • zip: (L1, L2) -zip-> [(a, b), ...] or (L1, L2) -zip(default)-> [(a, b), ...]
  • unzip [(A, B), ...] -unzip-> (L1, L2) or [(A, B), ...] -unzip(default)-> (L1, L2)

A possible approach for implementation is desugaring their uses to simple rules. Another approach is to add interpreter support for the operations.

@eelcovisser
Copy link
Contributor

We need more standard operations on lists such as

  • index: nth element of
  • concat (++)

@vvergu
Copy link
Member Author

vvergu commented Dec 6, 2016

Index we have. Use map access notation. We indeed need concat. Updating OP.

@vvergu
Copy link
Member Author

vvergu commented Dec 6, 2016

Actually, concat is a different category of development. I've created #146 for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants