can I directly remove an element from `data.reques...
# getting-started
e
can I directly remove an element from
data.requests
with
map
instead of using the
if
at the end?
Copy code
val rq = data.requests.find{ it.id == which && it.loaded }
        if(rq != null){
            val sc = rq.scene
            if (--rq.refCnt == 0)  data.requests.remove(rq)
            return sc
        }
p
Could you do a
filter
instead?
e
I'll see