1
1
mirror of https://github.com/kanaka/mal.git synced 2024-11-11 00:52:44 +03:00
mal/livescript/utils.ls
2017-05-10 17:57:31 +02:00

7 lines
149 B
Plaintext

{map} = require 'prelude-ls'
export list-to-pairs = (list) ->
[0 to (list.length - 2) by 2] \
|> map (idx) -> [list[idx], list[idx+1]]