fuzzball-muck/fuzzball

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

tanabi opened this issue · 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.