Sha256: f2f4e7e6d32fa3b6c040793aac42ab241eb3b68578a3ab5f321a11ae2f7712d4

Contents?: true

Size: 239 Bytes

Versions: 396

Compression:

Stored size: 239 Bytes

Contents

module Accumulate

let rec accumulateLoop func input acc = 
    match input with
        | [] -> acc |> List.rev
        | x::xs -> accumulateLoop func xs (func x :: acc)

let accumulate func input = accumulateLoop func input List.empty

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.179 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.178 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.177 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.176 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.175 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.174 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.173 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.172 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.171 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.170 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.169 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.167 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.166 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.165 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.164 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.163 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.162 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.161 tracks/fsharp/exercises/accumulate/Example.fs
trackler-2.2.1.160 tracks/fsharp/exercises/accumulate/Example.fs