Sha256: a7288c8cd351c55e369ff3c5faecbaff4144c033fd3427ea1f9a88b0112b4f1f

Contents?: true

Size: 186 Bytes

Versions: 396

Compression:

Stored size: 186 Bytes

Contents

module Triangle (rows) where

rows :: Integral a => Int -> [[a]]
rows = flip take triangle

triangle :: Integral a => [[a]]
triangle = iterate (\x -> zipWith (+) (0 : x) (x ++ [0])) [1]

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.139 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.138 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.137 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.136 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.135 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.134 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.133 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.132 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.131 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.130 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.129 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.128 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.127 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.126 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.125 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.124 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.123 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.122 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.121 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.120 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs