-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Labels
Description
Given the following expression asyncSeq { return [1] }
.
I would expect the type of it to be AsyncSeq<int>
, unfortunately it is AsyncSeq<'a>
.
I understand that in first place it's my wrong expectation about the result
's presence, actually as it's a sequential workflow, it shouldn't be there at all.
By looking at the source code I know that the presence of return
is caused by the wish to support the do! action
functionality, as it's translated by the F# compiler into Bind(action, fun () -> Return())
.
Could it be a F# compiler problem? What if the compiler would transform it to Bind(action, Zero())
, then the result
return
could be dropped right?
05.12.2015: corrected identifier
njlr, natalie-o-perret and voroninp