This project is read-only.
Lists and Indexed Iteration

Lists, Tuples and Options
Description: This sample shows simple uses of 'iteri'
let ListSample4() =
let data = ["Cats";"Dogs";"Mice";"Elephants"]
data |> List.iteri (fun i x -> printfn "item %d: %s" i x)

Execution Result:
item 0: Cats
item 1: Dogs
item 2: Mice
item 3: Elephants

Last edited Sep 14, 2011 at 3:50 AM by ttliu2000, version 1


No comments yet.