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.180 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.179 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.178 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.177 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.176 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.175 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.174 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.173 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.172 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.171 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.170 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.169 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.167 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.166 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.165 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.164 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.163 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.162 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.161 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.160 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs