¿Cómo puedo escribir funciones encoladas en especial cuando se trata del proceso de un ciclo iterativo?
¡
Funciones encoladas en CoffeScript - ¿Proceso iterativo?
Iniciado por
Nicolas
, abr 03 2014 14:49
#1 AUTOR PREGUNTA
Esto también te interesa!
#2
Publicado 03 abril 2014 - 19:58
Prueba con el siguiente ejemplo, ya después te encargaras de meterle tus variables y valores:
f1 = (completeCallback) ->
console.log('Esperando...')
completeCallback()
funciones = [ fun1, fun2, fun3 ]
next = -> if
funciones .length > 0
i = funciones .shift()
i(next)
next()