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

Alternative List Implementation #10

Open
HalosGhost opened this issue Mar 17, 2019 · 0 comments
Open

Alternative List Implementation #10

HalosGhost opened this issue Mar 17, 2019 · 0 comments

Comments

@HalosGhost
Copy link

It looks like an accepted alternative (to nested church pairs) implementation of lists in the lambda calculus is representing them as a right-fold.

There are a few benefits to this style:

  • it mirrors the style of natural numbers and booleans (etc.) in that the type's encoding is the (or, at least, a) valid eliminator
  • fold functions become superfluous (rather, you just need to eval the list with the proper arguments)

The obvious negative is that it would require updating the term-printer to support this encoding rather than the current version.

Is this too much work for not enough gain?

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

No branches or pull requests

1 participant