concept first argument in category c#

appears as: The first argument, first argument
Real-World Functional Programming with Examples in F# and C#

This is an excerpt from Manning's book Real-World Functional Programming with Examples in F# and C#.

The first argument to the printfn function is a format string. In our example, it specifies that the function should take only one additional parameter, which will be a string. The type is specified by the %s in the format string (the letter s stands for string) and the types of arguments are even checked by the compiler. Now we’ll show you how to run the code (listing 1.11).

The first argument of the List.map function is another function that’s used to obtain a new value using the original schedule. In this example, we calculate a new schedule and return it as the result of the function. The previous code can be simplified by using pipelining and a partial function application like this:

let newSchedules =
   schedules |> List.map (mapSchedule (fun d -> d.AddDays(7.0)))

When we specify the first argument (a function for calculating the date) to the mapSchedule function, we get a function of type Schedule -> Schedule. This is exactly what the List.map operation expects as the first argument, so we don’t have to write lambda function explicitly. This example shows another reason why many higher-order functions take the original value as the last argument. That way, we can use both pipelining and partial application when processing a list of values.

Figure 6.1. The mapFirst function takes a function as the first argument and applies it to the first element of a tuple that’s passed as the second argument.