-
Notifications
You must be signed in to change notification settings - Fork 65
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
Is ParAff Actually Alternative? #183
Comments
I guess that depends on what |
More seriously, |
@natefaubion I am using the ParAff instance for both |
Again, I think this kind of comes down to what you mean be |
The main interest of Aff is effects. I am just looking at how usual effects work, like printing to the console, and making appropriate generalisations. Strict or not, that just seems to be the way things are. |
wouldn't |
no as the <*> is of ParAff which executes both g and x in parallel |
Distributivity:
(f <|> g) <*> x = (f <*> x) <|> (g <*> x)
Let
r ∷ Ref Int
,f = delay 1.0
,g = delay 2.0
,x = modify (_ + 1) r
Then
But, by duplicating the
Ref.modify (_ + 1) r
effect and running both in parallel,r
is incremented by 2 rather than 1.(Yes, I fudged some types here for brevity).
The text was updated successfully, but these errors were encountered: