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.93 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.92 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.91 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.90 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.89 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.88 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.87 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.86 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.85 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.84 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.83 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.82 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.81 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.80 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.79 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.78 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.77 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.76 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.75 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs
trackler-2.2.1.74 tracks/haskell/exercises/series/examples/success-standard/src/Series.hs