blockMala1 :: Covariance a => 
  (Vector Double -> (Double,Vector Double)) ->
  Vector Double -> 
  [(a, MalaPar, Vector Int)] ->
  Sampler (Vector Double, [(a, MalaPar, Vector Int)])
blockMala1 postgrad xi blocks = do
  let go totalV [] accblocks = return (totalV, reverse accblocks)
      go totalV ((cov, mp0, vixs) : blocks) accblocks = do
          let myPostGrad vpars 
               = let (p, grad) = postgrad $ VS.update_ totalV vixs vpars
                 in (p, VS.backpermute grad vixs)             
          mp1 <- mala1 cov myPostGrad False mp0
          let newTotalV = VS.update_ totalV vixs (mpXi mp1)
          go newTotalV blocks $ (cov, mp1, vixs) : accblocks
  go xi blocks []
blockMala1 :: Covariance a => 
  (Vector Double -> (Double,Vector Double)) ->
  Vector Double -> 
  [(a, MalaPar, Vector Int)] ->
  Sampler (Vector Double, [(a, MalaPar, Vector Int)])
blockMala1 postgrad xi blocks = do
  let go totalV [] accblocks = return (totalV, reverse accblocks)
      go totalV ((cov, mp0, vixs) : blocks) accblocks = do
          let myPostGrad vpars 
               = let (p, grad) = postgrad $ VS.update_ totalV vixs vpars
                 in (p, VS.backpermute grad vixs)             
          mp1 <- mala1 cov myPostGrad False mp0
          let newTotalV = VS.update_ totalV vixs (mpXi mp1)
          go newTotalV blocks $ (cov, mp1, vixs) : accblocks
  go xi blocks []
blockMala1 postgrad xi blocks = do
  let go totalV [] accblocks = return (totalV, reverse accblocks)
      go totalV ((cov, mp0, vixs) : blocks) accblocks = do
          let myPostGrad vpars 
               = let (p, grad) = postgrad $ VS.update_ totalV vixs vpars
                 in (p, VS.backpermute grad vixs)             
          mp1 <- mala1 cov myPostGrad False mp0
          let newTotalV = VS.update_ totalV vixs (mpXi mp1)
          go newTotalV blocks $ (cov, mp1, vixs) : accblocks
  go xi blocks []