import {makeCircular, iterate} from 'imlazy'
import {compose, concat, nth, reverse} from 'ramda'

export const initialState = {
  random: xs => iterate(_ => nth(Math.random() * (xs.length - 1), xs)),
  up: makeCircular,
  down: compose(makeCircular, reverse),
  'up and down': xs => makeCircular(concat(xs, reverse(xs)))
}

export default (state = initialState, action) => state

@@ -17,17 +17,8 @@
 ular
-, iterate
 %7D fr
@@ -132,24 +132,82 @@
  =%3E 
-iterate(_ =%3E nth
+(%7B%5BSymbol.iterator%5D: function * () %7B%0A    while (true) yield nth(Math.floor
 (Mat
@@ -219,17 +219,16 @@
 dom() * 
-(
 xs.lengt
@@ -232,18 +232,19 @@
 ngth
- - 1
 ), xs)
+%0A  %7D%7D
 ),%0A 

fix random arp pattern