# Can we pass properties of the input as parameters? [duplicate]

Some challenges require, for instance, lists as input. A list has a property being its size.

Several languages have builtins to get properties such as the size for a list (all golfing language, JavaScript, Java, C#, to name a few), some don't (C). Those who don't usually pass the list size as argument (but not always).

So is it acceptable for languages who have builtins to still accept an extra parameter which is a property of the input?

For example in JavaScript:

a=>l=>a[l-1]


is shorter than

a=>a[a.length-1]

• Yep, it's definitely a duplicate. Sorry I couldn't find it. Mar 12 '19 at 17:12