Created
October 1, 2013 18:17
-
-
Save LeviSchuck/6782703 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
lookupThing t = do | |
?s <- someStorageConstant | |
context <- getContextSandbox | |
(res, context') <- runKV context $ do | |
thing <- getKV t | |
return $ case thing of | |
Nothing -> Left "Nope, nothin'" | |
Just kv -> Right kv | |
return res |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment