search

Home  >  Q&A  >  body text

javascript - What is the purpose of analyzing this code?

((y) => 
  (f => f(100))
    (y(self => 
      n => n < 0 ? 0 : n + self(n-1))))
  (g => 
    (f=>f(f))(
        self => 
            g( (...args)=>self(self)(...args) ) 
    ))
ringa_leeringa_lee2792 days ago394

reply all(1)I'll reply

  • 阿神

    阿神2017-05-19 10:09:29

    I didn’t look carefully. To be honest, I feel that there are too many arrow functions nested, which affects the readability. Of course, it may be because of my low level

    At a casual glance, it should be using recursion to simulate a loop. . If you think I'm wrong, boss. . Please point it out and I will change it

    reply
    0
  • Cancelreply