Created
March 6, 2018 17:10
-
-
Save FruitieX/afcc74e99a22db6b6c540fd1ef7edfd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- WTF instant creates a Maybe Instant | |
| toLight :: StupidIntermediateStrMapThingy -> Maybe Lights | |
| toLight = | |
| foldlWithIndex (\k m v -> do | |
| let transitionStart = instant (Milliseconds v.transitionStart) | |
| let transitionTime = Milliseconds v.transitionTime | |
| insert (LightId k) (Light v { transitionStart = transitionStart, transitionTime = transitionTime }) m | |
| ) empty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment