Guest User

Untitled

a guest
Oct 22nd, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. fix _readAll = #(files: Array, _ret: Fn){
  2. fix allTexts = Array(String)()
  3. files._parrallel(#(name, _ret){
  4. _read(name, #(text){
  5. allText._pushBack(text)
  6. _ret()
  7. })
  8. }, #(err){ _ret(err, allTexts) })
  9. }
  10. _readAll(files, #(err, allTexts){ })
  11.  
  12. fix _readAll2 = #(files: Array, allTexts: &Array, _ret: Fn){
  13. files._parrallel(#(name, _ret){
  14. _read(name, #(text){
  15. allText._pushBack(text)
  16. _ret()
  17. })
  18. }, #(err){ _ret(err, allTexts) })
  19. }
  20. fix allTexts = Array(String)()
  21. _readAll2(files, &allTexts, #(err){ })
Add Comment
Please, Sign In to add comment