Another little thought on the function transfer of "Curry"
in Note with 8 comments
Another little thought on the function transfer of "Curry"
in Note with 8 comments

When taking a bath, continue to think about Currie's products. After washing, run to the computer and continue to test. It seems that there are no eggs left, but write down first. I feel that it may be helpful for later learning.

It is still written in JavaScript. This time, the running results will not be listed.

A function transfer

 function say(word) { console.log(word); } function execute(someFunction, value) { someFunction(value); } execute(say, "yes");

Use of multiple function transfers

 function say(arg1) { console.log(arg1); } function write(arg2) { console.log(arg2); } function listen(arg3) { console.log(arg3); } function execute(someFunction, value) { someFunction(value); } execute(say, "yes"); execute(write, "no"); execute(listen, "welcome");

Sometimes we need to do these three things at the same time, or two of them

 function listen(arg1) { console.log(arg1); return (callback) => { return callback && callback(arg1); } } function say(arg2) { console.log(arg2); return (callback) => { return callback && callback(arg2); } } function write(arg3) { console.log(arg3); return (callback) => { return callback && callback(arg3); } } function review(value) { console.log(value); return (callback) => { return callback && callback(value); } } review(3); review(3)(say); review(3)(say)(listen); review(3)(say)(listen)(write);

It's just like this. It seems useless... I'd better read a book

/Escape

Responses
  1. Red and hot, in a trance, bathing inspires intelligence

    Reply
    1. @Seon

      Red and red, in a daze:)

      Reply
  2. Where did you find the picture on the blogger's home page? It's very beautiful.

    Do you need to cut it manually every time?

    Reply
    1. @Five eight is ten

      It needs to be cut manually. Taking the thumbnail of each article seriously is also an important part of taking each article seriously.

      As for pictures, Baidu or Google's map search function can find a bunch.

      Reply
  3. I also use your theme. Why is there no portrait in front of the article

    Reply
    1. @Kaige We Media

      Enter the article editor, and you can see the custom fields at the end
      Among them, there are lamp, eye, code, list, quote, share, chat, locked, images, ad before the characters, and you can select another one.
      For details, see: https://www.linpx.com/p/lpisme-typecho-theme.html

      Reply
  4. Very good, thanks for sharing.

    Reply
    1. @Kaige We Media

      Thank you:)

      Reply