[ prog / sol / mona ]

prog


Marvin Minsky - The Beauty of the Lisp Language

152 2020-10-11 10:29

Here what it does without the Lispy syntax.

return lambda(//main return int 
    int,//return type(as above)
    (int x),//outer function arguments
   print("Result:",
       x*lambda(//what is computed after this function
         int,//return type of inner lambda function
         (int a),//arguments for inner lambda
         print(
          a+localN+globalN,//this is the "Result:" part
          "\n Characters printed*10:"//this is for x*lambda 
          )
         )(strtoul(//use console argument 1
           argv[1],NULL,10)
            +globalX+localX)//adding two variables
          )
         )
    (10);//outer argument (int x)
301


VIP:

do not edit these