fork download
  1. (* Infinite sequence of whole numbers. 0 .. *)
  2. let indices = Seq.unfold (fun x -> Some(x, x + 1)) 0
  3.  
  4. (* Zips the given sequence with indices of elements. *)
  5. let zipWithIndex coll = Seq.zip coll indices
  6.  
  7. printfn "%A" ([12; 8; 9; 90; 3; 24] |> zipWithIndex |> Seq.minBy fst)
Success #stdin #stdout 0.2s 12648KB
stdin
Standard input is empty
stdout
(3, 4)