A library of functions across languages.
Intersperses an element among each pair of elements in an array.
> intersperse(0, (sequence(3)))
[1, 0, 2, 0, 3]
- Haskell:
intersperse
(source)
Create an array of numbers from 1
to n
.
> sequence(3)
[1, 2, 3]