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.73 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.72 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.71 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.70 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.69 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.68 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.67 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.66 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.65 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.64 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.63 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.62 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.61 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.60 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.59 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.58 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.57 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.56 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.55 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.54 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs