On Wednesday 08 November 2006 08:23, Daniel McAllansmith wrote: Ahhh, whoops. It seems that lack of compilation errors is not a universal sign that a haskell program is correct. > permute 0 d = mkD [] mkD doesn't allow distributions with 0 sum probabilities, so you'd need to restrict the range of k