Q:

Trying to create a function, and then filtering a sequence by "not that function" in F#

My data is a SEQUENCE of:
[(40,"TX");(48,"MO");(15,"TX");(78,"TN");(41,"VT")]
My code is as follows:
type Csvfile = CsvProvider<somefile>
let data = Csvfile.GetSample().Rows

let nullid row = 
    row.Id = 15

let otherid row =
    row.Id= 40

let iddata = 
   data
   |> Seq.filter (not nullid)
   |> Seq.filter (not otherid)

I create the functions.
Then I want to call the "not" of those functions to filter them out of a sequence.
But the issue is that I am getting errors for "row.Id" in the first two functions, because you can only do that with a type. 
How do I solve this problem so I can accomplish this successfully.
My result should be a SEQUENCE of:
[(48,"MO);(78,"TN");(41,"VT")]

A:

You can use >> operator to compose the two functions:
let iddata = 
   data
   |> Seq.filter (nullid >> not)
   |> Seq.filter  (othered >> not)

See Function Composition and Pipelining.
Or you can make it more explicit:
let iddata = 
   data
   |> Seq.filter (fun x -> not (nullid x))
   |> Seq.filter  (fun x -> not (othered x))

You can see that in action:
let input = [|1;2;3;4;5;6;7;8;9;10|];;
let is3 value =
    value = 3;;

input |> Seq.filter (fun x -> not (is3 x));;
input |> Seq.filter (not >> is3);;

They both print val it : seq<int> = seq [1; 2; 4; 5; ...]

