Mike February 2016

Hacklang Higher order functions for Collections

Do Hacklang Collections have higher order functions such as Reduce, Some, All or an easy way to implement such methods. The Collection I am most focused on is the Vector. It seems to only have Map and Filter. The others would help in writing more clean looking functional code.

Answers


Josh Watzman February 2016

Full information on the different Hack collections is best seen on the API docs for Vector (and other classes).

I also only see ->map and ->filter, though writing a utility function to do reduce yourself isn't particularly difficult, of course.

Post Status

Asked in February 2016
Viewed 3,373 times
Voted 12
Answered 1 times

Search




Leave an answer