Skip to content
This repository was archived by the owner on Feb 22, 2022. It is now read-only.

Conversation

@polytypic
Copy link
Contributor

These optimizations avoid some unnecessary allocations.

`async.Bind (expr, async.Return)` is equivalent to `expr` (Monad laws).

Note that `fun s -> f () s` is not necessarily equivalent to `f ()` in
F#.
`Job.bind Job.result expr` is equivalent to `expr` (Monad laws).

Note that `fun s -> f () s` is not necessarily equivalent to `f ()` in
F#.
`Job.bind (fun p -> Job.result e2) e1`

is equivalent to

`Job.map (fun p -> e2) e1`.
@polytypic
Copy link
Contributor Author

No hurry, but pinging @kolektiv just in case as you don't seem to be watching this repository. :)

@kolektiv
Copy link
Member

kolektiv commented Sep 7, 2016

Oh! Well pinged, I hadn't seen this. Somehow I'm not watching my own repo... I'll fix that!

Thanks! I'd pretty much mechanically translated the async logic - this is much more sensible :)

@kolektiv kolektiv merged commit d0d08ea into xyncro:master Sep 7, 2016
@kolektiv
Copy link
Member

kolektiv commented Sep 7, 2016

I'll just bump the version too and it'll go straight out...

@kolektiv
Copy link
Member

kolektiv commented Sep 7, 2016

And that's live! Once NuGet gets the indexes updated, rc05 of the core libraries will be available. Thanks again @polytypic!

@polytypic polytypic deleted the feature/optimized-async-and-hopac-combinator-usage branch September 7, 2016 18:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants