Javascript Array flat() to Rescript

Looking for the best way to recreate the flat() function from Array in Rescript using Belt std lib.

Thanks in advance!

If your usecase is to flatten a nested array a single level (ie array<array<'a> => array<'a>), Array.contcatMany is the answer.

1 Like

Thanks so much @amiralies - totally overlooked this method!

1 Like