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.119 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.118 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.117 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.116 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.115 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.114 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.113 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.111 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.110 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.109 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.108 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.107 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.106 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.105 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.104 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.103 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.102 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.101 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.100 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs
trackler-2.2.1.99 tracks/haskell/exercises/pascals-triangle/examples/success-standard/src/Triangle.hs