-
Notifications
You must be signed in to change notification settings - Fork 397
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
[Question] Doesn't Fold
from README.md duplicate its function-argument?
#56
Comments
fold
from README.md duplicate its function-argument?Fold
from README.md duplicate its function-argument?
On this scale, HVM deals fine with 1-4. Fold is more around 2. And 5 is basically problematic useless stuff. (I challenge anyone to come up with a good example that HVM can't handle, that has any relevant application, or that isn't a contrived way to express a program that just needs to be refactored to not suck.) |
A-ha, so a function that directly self-apply an argument can't be used twice? In this case, self-applying stuff like |
It can! For example, this is fine:
Here, |
The
Fold
:The
2
:How is it possible that
(g g)
is a no-no, but theFold
, supposedly, is able to be used twice?P.S.: Are the following scenarios possible and correct:
(Fold lst (\x y. ... (Fold ...) ...) 5)
;(Fold lst Plus (... (Fold ...) ...))
?The limitation seem to be there to prevent 2 non-annihilating
Dup
nodes to go one through another and becoming 4, isn't it?The text was updated successfully, but these errors were encountered: