haskell - Is there a built in function to convert a NodeList to a real list (ghcjs-dom)? -


how can convert result of element.queryselectorall body "h1" io nodelist io (list node). know write function myself. there builtin function?

my implementation:

nodelisttolist nl = nl        & nodelist.getlength      <&> (\x -> [0..x - 1])      >>= mapm (item nl)      <&> catmaybes 

Comments