diff options
Diffstat (limited to 'libraries/base/GHC/List.hs')
-rw-r--r-- | libraries/base/GHC/List.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/GHC/List.hs b/libraries/base/GHC/List.hs index 65fa4f54a5..ba5229f9cb 100644 --- a/libraries/base/GHC/List.hs +++ b/libraries/base/GHC/List.hs @@ -425,7 +425,7 @@ The type of (g :: (a -> b -> b) -> b -> b) allows us to apply parametricity: Either the tuple is returned (trivial), or scanrFB is called: g (scanrFB f c) (q0,n) = scanrFB ... (g' (scanrFB f c) (q0,n)) Notice that thanks to the strictness of scanrFB, the expression -g' (scanrFB f c) (q0,n) gets evaluated aswell. In particular, if g' is a +g' (scanrFB f c) (q0,n) gets evaluated as well. In particular, if g' is a recursive case of g, parametricity applies again and we will again have a possible call to scanrFB. In short, g (scanrFB f c) (q0,n) will end up being completely evaluated. This is resource consuming for large lists and if the |