Hacker News new | past | comments | ask | show | jobs | submit login

You've written the react function:

    react lowpower fridgepowerchange wifiusers
            | lowpower = Just PowerOff
            | wifiusers > 0 = Just PowerOn
            | otherwise = fridgepowerchange
The big deal with inverterPowerChange is this line:

    return $ react <$> lowpower <*> fridgepowerchange <*> wifiusers
It binds values emitted by the lowpower, fridgepowerchange, and wifiusers Behaviors, and wraps around it, returning a Behavior that itself emits values.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: