Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> ask someone to write a signature for array flat

Out of curiosity - what do you think is a satisfactory answer here?

My answer would vary wildly based upon more details, but at the most basic all I can think you could guarantee is Array<unknown> => Array<unknown>?



In an interview I'd be happy just seeing some reasoning.

IRL I'd be happy with someone at least searching for a definition and trying to learn from it.

I've asked this question multiple times as implementing array flatten used to be our go to ice breaker question, and many devs had no issues reasoning and finding an okay type definition.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: