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

Infinite list gives syntax error #5

Open
tejasbubane opened this issue Jun 11, 2020 · 2 comments
Open

Infinite list gives syntax error #5

tejasbubane opened this issue Jun 11, 2020 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@tejasbubane
Copy link

tejasbubane commented Jun 11, 2020

PSCi, version 0.13.6
Type :? for help

> double = [x*2 | x <- [1,2,3]]
> squares = [x * x | x <- [1..]]
Unexpected token '=' at line 1, column 9
> a = [1..]
Unexpected token '=' at line 1, column 3

Normal list double works. But squares with infinite list does not.

Not sure if this is an issue with the docs or the runtime itself.

@emqplus
Copy link
Contributor

emqplus commented Jun 12, 2020

@tejasbubane The evaluation model of hamler is strict, so the infinite list cannot work.

@emqplus emqplus self-assigned this Jun 12, 2020
@emqplus emqplus added this to the 0.1.1 milestone Jun 12, 2020
@emqplus emqplus added the documentation Improvements or additions to documentation label Jun 12, 2020
@spavikevik
Copy link
Contributor

@tejasbubane The evaluation model of hamler is strict, so the infinite list cannot work.

@emqplus Pardon my ignorance of Erlang, but this project looks interesting so I wanted to ask out of curiosity: is it possible to implement lazy evaluation and do you have any plans to support it in some form in the future?

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

No branches or pull requests

3 participants