COMMUNITY

Lambda moved to hx3compat in Haxe 4


(François Barbut) #1

I noticed Lambda has been move outside Std library ( in hx3compat https://github.com/HaxeFoundation/hx3compat/tree/master/std )

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


(Valentin Lemière) #2

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.


(Adrian V) #3

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) ?


(François Barbut) #4

Thanks Valentin :slight_smile:


(Valentin Lemière) #5

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.