# Functions – Select the 1st and then the following elements of a & # 39; list & # 39;

I'm using a mix `span` and `part` to try to extract the arguments of a function that I need.

I use a function like $$J ^ mu (1,2,3)$$
and I will try to portray this as `J[mu,Range[1,3]]`or more generally for any index or any number of arguments, `J[index_,Range[1,n_]]`,

I have to pick the first element each time, that is H. The index of this function, and then I have to select some consecutive elements of the list. I.E; I have to choose terms like `J[index,2,3]`,

I tried with some variations of `span` in the `part`Argument, but I'm having trouble taking just the first variable and some extras.

In particular, I'm trying to program the Berends-Giele recursion relationship for n-gluons.

Any help would be appreciated.

Many Thanks.

To edit:

To show an example:

``````J[mu,1,2,3,4,5][[3;;5]]
``````

gives a result of

``````J[2,3,4]
``````

as expected. If I take;

``````J[mu,1,2,3,4,5][[1]]
``````

I will get

``````mu
``````

that is not as expected. What I want is something like saying;

``````J[mu,1,2,3,4,5][[1,3;;4]]
``````

what would come back

``````J[mu,3,4]
``````

Is that possible with `span` and `part`?