Lambda moved to hx3compat in Haxe 4

I noticed Lambda has been move outside Std library ( in hx3compat hx3compat/std at master · HaxeFoundation/hx3compat · GitHub )

So my question is : What would be the “new official way” to do actions like Lambda.find , Lambda.count or in haxe 4 Std ?

Haxe 4 still has a Lambda class, but it works on Array instead of List, to be more useful.
hx3compat contains the old Lambda class, for compatibility.


Is there a way to use the new Lambda class from Haxe 4 when I need to include lib hx3compat, because of some other classes (Haxe Remoting for example) ?

Thanks Valentin :slight_smile:

Right now there’s nothing specific for that, and if the haxe 3 code using hx3compat needs the old lambda that’d be an issue.

But you could always take the file from the std and copy it to your project,
not the cleanest approach but it’d work.