Skip to content

Instantly share code, notes, and snippets.

@LukaHorvat
Created November 12, 2014 16:40
Show Gist options
  • Save LukaHorvat/1085edccf661a671c328 to your computer and use it in GitHub Desktop.
Save LukaHorvat/1085edccf661a671c328 to your computer and use it in GitHub Desktop.
pop :: State (Seq Int, Set Int) (Maybe [Int])
pop = do
(x :< xs) <- viewl <$> gets fst
modify $ const xs *** id
return x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment