fuzzball icon indicating copy to clipboard operation
fuzzball copied to clipboard

MPI list funcs LREMOVE doesn't act on single list item {null:} (SF issue)

Open tanabi opened this issue 3 years ago • 0 comments

List functions lcommon, lremove, etc don't act upon a passed, given argument of null.

This means you have to pass two nulls in a list to remove null items from a list, or a null at the begining (but not end) of a passed list.

Null items in a passed list are just lost.

Examples:
@mpi {mklist:{null:},one,two}
"
one
two"

@mpi {mklist:{null:},one,two,{null:}}
"
one
two
"

@mpi {lremove:{mklist:{null:},one,two,{null:}},one}
"
two"

@mpi
{lremove:{mklist:{null:},one,two,{null:}},{mklist:{null:}}}
"
one
two"

@mpi
{lremove:{mklist:{null:},one,two,{null:}},{mklist:one,{null:}}}
"
two"

@mpi
{lremove:{mklist:{null:},one,two,{null:}},{mklist:{null:},{null:}}}
"one
two"

Inconsistent (and annoying).

This may turn into a feature request for an lstrip command?

This may partially work but may still fail for this:

{lremove:{mklist:{null},one,two,{null}},}

This item may already be resolved, verify.

tanabi avatar Jul 06 '21 17:07 tanabi