Skip to content

Edit Lambda doesn't deal correctly with omitted arguments #151

@jimmytacks

Description

@jimmytacks

Edit Lambda doesn't currently cope with omitted arguments.

e.g. say I call EXPLODE(A1) using our EXPLODE lambda.

Then I do /Edit Lambda.

I get this:

=LET(
text, O13,
Help, TEXTSPLIT( "FUNCTION: →EXPLODE(text, chunk_size, horizontal)¶" & "DESCRIPTION: →Splits a string into an array of character chunks of a given size.¶" & "VERSION: →Apr 12 2026¶" & "PARAMETERS: →¶" & " text →(Required) The string to split.¶" & " chunk_size →(Optional) Number of characters per chunk. Default: 1.¶" & " horizontal →(Optional) If TRUE, returns a horizontal row array. Default: FALSE.¶" & "EXAMPLE: →¶" & "Formula →=EXPLODE(""abcdefgh"", 3)¶" & "Result →{""abc"";""def"";""gh""}", "→", "¶" ),
Help?, ISOMITTED(text),
_size, IF(ISOMITTED(chunk_size), 1, chunk_size),
_horiz, IF(ISOMITTED(horizontal), FALSE, horizontal),
_count, CEILING(LEN(text) / _size, 1),
_starts, IF(_horiz, SEQUENCE(1, _count, 1, _size), SEQUENCE(_count, 1, 1, _size)),
result, MID(text, _starts, _size),
IF(Help?, Help, result)
)

Just the body of the LAMBDA. The other Lambda arguments (chunk_size and horizontal) aren't present, which makes the LET invalid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions