Skip to content
Browse files

One small victory for monadic thinking.

  • Loading branch information...
1 parent b076175 commit 199e76a7cb5501046d5f2e2697ed80148ed41ee2 @timmah timmah committed Jun 10, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 basic/src/Source.hs
View
2 basic/src/Source.hs
@@ -20,7 +20,7 @@ genParticlesInCells :: Mesh m => m -> RNG -> [(CellIdx,Int)] ->
FP -> -- ^ e'
[Particle]
genParticlesInCells msh rng nPerCell a e' =
- join $ map (genParticlesInCell msh rng a e') nPerCell
+ nPerCell >>= (genParticlesInCell msh rng a e')
-- | generate a given number of particles in one cell
genParticlesInCell :: Mesh m => m -> RNG ->

0 comments on commit 199e76a

Please sign in to comment.
Something went wrong with that request. Please try again.