returning a list in R and functional programming behavior
===

I have a basic questions regarding functional programming in R.

Given a function that returns a list, such as: 

    myF <- function(x){
       return (list(a=11,b=x))
    }
why is it that the list returned when calling the function with a range or vector is always the same lenght for 'a'
Ex:

    myF(1:10)

returns:

    $a
    [1] 11
    
    $b
    [1]  1  2  3  4  5  6  7  8  9 10

How can one change the behavior so that the 'a' list has the sample length as b's. 

I am actually working with a bunch of S4 objects that do I cannot easily convert to list (using as.list) so _apply is not my first choice.

Thanks for any insight or help!

Mandy