Disposal function in 4D


It would be nice if we can write disposal (or anonymous) function in 4D. Something like:

Code block("MethodName")
// code for searching in collection
End code block


Hi, to achieve somethings similar, I use formula ie. have the code near the find/map/reduce
All code must be one line code in this case

but because for the moment collection could only use method name and not formula I make wrapper methods

$col:=New collection(1;2;3;4)
$result:=$col.map("c_formula";Formula($1+1))  // ++

my code is here https://github.com/mesopelagique/CollectionUtils

1 Like

Hi Eric,

Thanks for the information.
And that is impressive idea for me.
I’ll investigate your code more.