I suggest we ...

Create 'filteri' and 'foralli' functions for the various collections Array, List, Seq

mapi allows us to map a collection using not just the items in the collection but also the index of each item.

Could we do something similar with filter?

let nums = [0; 1; 2; 3; 4; 5; 6; 7]
let atEvenPos = List.filteri (fun i x -> i%2=0) nums

Result
atEvenPos = [0; 2; 4; 6]

13 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Richard DaltonRichard Dalton shared this idea  ·   ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      F# Language

      Feedback and Knowledge Base