# return number of inputs into a function

**URL:** <https://forum.kx.com/t/return-number-of-inputs-into-a-function/12024>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [June 4, 2020, 10:02pm UTC](https://forum.kx.com/t/return-number-of-inputs-into-a-function/12024 "2020-06-04T22:02:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_R](https://avatars.discourse-cdn.com/v4/letter/b/a698b9/32.png) [@Ben\_R](https://forum.kx.com/u/Ben_R)\
**Post date:** [June 4, 2020, 10:02pm UTC](https://forum.kx.com/t/return-number-of-inputs-into-a-function/12024/1 "2020-06-04T22:02:00Z")

</div>

is there a good way to return the max number of arguments that you can enter into a function? i tried  
f:{x+y+z}

while[{.[f;x;“ERROR”]} ) \<\> “ERROR”; count x] where x: til 5

---

<div class="post-metadata">

**Author:** ![jsawyer](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@jsawyer](https://forum.kx.com/u/jsawyer)\
**Post date:** [June 4, 2020, 10:39pm UTC](https://forum.kx.com/t/return-number-of-inputs-into-a-function/12024/2 "2020-06-04T22:39:00Z")

</div>

Hi Ben,

you can use the value function on your function to get a summary of its structure, including the parameter list:

`q)f:{x+y+z}q)value f0x7a794178410003`x`y`z`symbol$(),`5 3 4 1 2"..f"“”-1"{x+y+z}"q)count value[f] 13`

NB: the structure of the result of this functions subject to change between versions. See&nbsp;https://code.kx.com/q/ref/value/#lambda
