Web programming with higher order functions

We study higher-order functions in our class, and our professor noted that they can be useful for web programming. I am not sure what cases in which this would be true, and I wondered if anyone had experience with higher-order functions in some common web programming tasks and in which situations they would be useful.

I read our book, but web programming was not mentioned, I suppose this was what the professor was talking about, but it a little aroused my interest.

Thank!

+3
source share
3 answers

, , JavaScript. (, / ) jQuery ready():

$(document).ready(function(){
    alert('The DOM is ready for manipulation!');
});

, ... , .

+3

Play, (Scala) Lift (Scala), SeaSide (Smalltalk) Webmachine (Erlang) - , .

+2

Clojure makes extensive use of higher-order features for web development in its superior Ring framework . Watch this great video that explains some of the concepts.

Main idea:

  • A web application is just a function that displays a response request
  • This way you can compose an entire web application using higher order functions.
0
source

Source: https://habr.com/ru/post/1775897/


All Articles