Skip to content
Tcl Source Code View Ticket
Login

View Ticket

New option for "lsearch": "-boolean"

Closed / Out of Date3530003fffffffffffffffffffffffffffffffffCreated 15 years agoUpdated 20 days ago
Descriptionplain2012-05-26 20:07:21
There is no equivalent option of lsearch which filters as "if {$element} {return $index}", but it would be nice.
dkfhtml2013-11-18 19:16:50

That's funny; I don't recall seeing this one before. For general filtering, I'd use lamp instead (since you can continue to skip an element).

dkfhtml2013-11-19 09:38:13

lmap! Not lamp! Stupid autocorrect…

serhiy.storchakawiki2026-11-13 11:18:44

Closing: lmap (TIP 405, Tcl 8.6), as dkf suggested, covers this filtering, e.g. lmap e $list {if {!$e} continue; set e}.

Log in (anonymous is fine) to add a comment.