Skip to content

Instantly share code, notes, and snippets.

@ion1
ion1 / 0readme.md
Last active October 22, 2018 18:52
Emulating the elegance of JavaScript's `new Array` in Haskell

Emulating the elegance of JavaScript's new Array in Haskell

What does new Array(x) do? Trick question. It does different things depending on whether x is an integer or something else.

I wanted to replicate this elegant functionality in Haskell: behold.