We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 089d200 commit 539c470Copy full SHA for 539c470
Statistics/Sample.hs
@@ -1,4 +1,5 @@
1
{-# LANGUAGE FlexibleContexts #-}
2
+{-# LANGUAGE BangPatterns #-}
3
-- |
4
-- Module : Statistics.Sample
5
-- Copyright : (c) 2008 Don Stewart, 2009 Bryan O'Sullivan
@@ -459,8 +460,8 @@ x ^ 4 = (x * x) * (x * x)
459
460
x ^ 5 = (x * x) * x * (x * x)
461
-- x ^ n = x * (x ^ (n-1))
462
x0 ^ n0 = go (n0-1) x0 where
- go 0 acc = acc
463
- go n acc = acc `seq` go (n-1) (acc*x0)
+ go 0 !acc = acc
464
+ go n acc = go (n-1) (acc*x0)
465
{-# INLINE (^) #-}
466
467
-- don't support polymorphism, as we can't get unboxed returns if we use it.
0 commit comments