Skip to content

Experiment with Lazy Evaluation #18

Description

@adamhaney

Since lispy is aimed at mainly providing a functional environment it would be very interesting to me if return types could be lazy. Currently I can think of a very simple way that this would work:

Class LazyResult(object):
    expression = <non evaluated expression>

    def getattr(self, *args, **kwargs):
        return expression.getattr(self, *args, **kwargs)

Expressions instead of being evaluated could just be stored in lazy results that were returned (and any operation against them would cause them to be evaluated). This is just a rough idea and I'm sure it would be more complicated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions