fsprojects / FSharp.Control.Reactive

Extensions and wrappers for using Reactive Extensions (Rx) with F#.
http://fsprojects.github.io/FSharp.Control.Reactive
Other
284 stars 60 forks source link

rxquery groupJoin no work #121

Closed xp44mm closed 4 years ago

xp44mm commented 6 years ago

i don't find any groupJoin example in tests or other place. and i reference the F# query expression, write rxquery as follow:

rxquery {
    for male in maleEntering do
    groupJoin female in femaleEntering 
        on (maleEntering.Where(fun e -> e.Name = male.Name) = femaleExiting.Where(fun e -> female.Name = e.Name)) 
        into maleEncounters
    select (male.Name, maleEncounters)
}

and ide emerge error. error line is

    groupJoin female in femaleEntering 
        on (maleEntering.Where(fun e -> e.Name = male.Name) = femaleExiting.Where(fun e -> female.Name = e.Name)) 
        into maleEncounters

the message means that groupJoin has something wrong, in is unexpected. and the query's method chain is:

maleEntering
    .GroupJoin(femaleEntering,
        (fun male -> maleExiting.Where(fun exit -> exit.Name = male.Name)),
        (fun female -> femaleExiting.Where(fun exit -> female.Name = exit.Name)),
        (fun m females -> m.Name, females))

and the result is correct. is the groupJoin clause syntax correct?

panesofglass commented 4 years ago

@xp44mm did the related PR resolve your issue?