Sha256: 3a8c4362721969fadd66f70ee5521bd52f1062a1e0da8257952dd5ce552d7fe2

Contents?: true

Size: 255 Bytes

Versions: 351

Compression:

Stored size: 255 Bytes

Contents

module Series (slices) where

import Data.Char (digitToInt)
import Data.List (tails)

slices :: Int -> String -> [[Int]]
slices 0 _ = [[]]
slices n s = map (take n) . take (length s - n + 1) . tails $ numberSeries
    where numberSeries = map digitToInt s

Version data entries

351 entries across 351 versions & 1 rubygems

Version Path
trackler-2.2.1.134 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.133 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.132 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.131 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.130 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.129 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.128 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.127 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.126 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.125 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.124 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.123 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.122 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.121 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.120 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.119 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.118 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.117 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.116 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.115 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs