Skip to content

Snoclists? #2684

Open
Open
@gallais

Description

@gallais

Snoclists (lists that grow on the right rather than the left) are commonly used when
representing syntaxes with binding because they grow the same way contexts grow
which allows you to transcribe everything without having to "think backwards".

They're also really useful to represent the intermediate state of a computation slowly
going through a list left-to-right with the "fish" combinator having elements in the
middle freely flow from one side of the divide to the other without the need to deploy
rewrite rules (which you would need if you were using a pair of lists instead).

Are we open to adding them to the stdlib (I'm finally open this up because I need them
for the nth time and they're not available)? They're part of Idris 2's prelude for instance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions