Vyxal / Vyxal

A code-golfing language experience that has aspects of traditional programming languages - terse, elegant, readable.

Home Page:https://vyxal.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number of inputs/parameters digraph

AMiller42 opened this issue · comments

Add a digraph to get the number of inputs given to a program, or the number of parameters passed to a function or lambda. These will probably be most useful as separate digraphs.

Since ¤ is already used to index into function/lambda parameters, would make sense for that digraph.
For inputs, since #? is already in use, I'd suggest one of #⁰ #¿. I personally like the last one for its similarity.

Examples:

Inputs: "a" "b" "c"
#¿  ->  Returns 3
'a 'b 'c λ2|#¤}  ->  Returns 2

To whom it may concern: As a part of fixing the ¹ element, I added Inputs.length, which will make the "Length of inputs" digraph really easy, so if you plan on implementing these, wait until that gets merged.