Skip to content

Instantly share code, notes, and snippets.

@lorenzo
Created August 26, 2018 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lorenzo/6d0047dbd7eaeb59e7ceaacadd413326 to your computer and use it in GitHub Desktop.
Save lorenzo/6d0047dbd7eaeb59e7ceaacadd413326 to your computer and use it in GitHub Desktop.
import qualified Data.HashMap.Strict as HM
import qualified Data.Vector as V
case a of
Array objs -> mapMaybe (HM.lookup key) (V.toList objs)
_ -> []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment