{"id":278731,"date":"2016-04-21T06:05:04","date_gmt":"2016-04-21T02:05:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=278731"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=278731","title":{"rendered":"Liscript \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c TCO"},"content":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/58f\/f34\/a49\/58ff34a4919a4b6c9ea37656be866cda.png\"\/><\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habrahabr.ru\/post\/281859\/\">\u041f\u0438\u0448\u0435\u043c Lisp-\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u043d\u0430 Java<\/a> \u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0438 \u0442\u0435\u0437\u0438\u0441\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0430\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 Lisp-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u0432\u0430\u043b Liscript \u2014 \u043d\u0430 Haskell \u0438 \u043d\u0430 Java. \u041d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0432\u044b\u0434\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442, \u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u0440\u0435\u043c\u044f\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c. \u0421\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u043f\u0440\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e TCO (tail call optimization) \u2014 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u042d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u044b\u0437\u0432\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430, \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0447\u0442\u043e \u044f \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u044f \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044e \u0441\u0435\u0431\u0435 \u043a\u0440\u0430\u0442\u043a\u043e \u043e\u0431\u0440\u0438\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0437\u044b, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0443\u0434\u0443 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0430 \u043d\u0438\u0445 \u0441\u0441\u044b\u043b\u0430\u0442\u044c\u0441\u044f \u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b.<\/p>\n<h4>\u042d\u0432\u0430\u043b \u0431\u0435\u0437 \u0410\u043f\u043f\u043b\u0430\u044f \u2014 \u043a\u0430\u043a \u041c\u0438\u043a\u043b\u0443\u0445\u043e \u0431\u0435\u0437 \u041c\u0430\u043a\u043b\u0430\u044f<\/h4>\n<p>  \u041f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u044f\u0437\u044b\u043a\u043e\u0432 Lisp-\u0441\u0435\u043c\u0435\u0439\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0432\u0438\u0434\u0435 \u043f\u0430\u0440\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439 (\u043f\u0441\u0435\u0432\u0434\u043e\u043a\u043e\u0434):<\/p>\n<pre><code class=\"java\">eval (expr, env)                      \/\/ expr - \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, env - \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435     if typeof(expr) = Atom            \/\/ \u0442\u0438\u043f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f - \u0430\u0442\u043e\u043c         return lookup(expr, env)      \/\/ \u0438\u0449\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0438\u043c\u0435\u043d\u0438 \u0432 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438     elseif typeof(expr) = List        \/\/ \u0442\u0438\u043f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f - \u0441\u043f\u0438\u0441\u043e\u043a         evalexpr = mapeval(expr, env) \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430                                       \/\/ \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044f eval                                       \/\/ \u0438 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044f \u043d\u043e\u0432\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a         return apply(evalexpr, env)   \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430     else         return expr                   \/\/ \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435          apply (expr, env)                     \/\/ expr - \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, env - \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435     op = head(expr)                   \/\/ \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f - \u043f\u0435\u0440\u0432\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0441\u043f\u0438\u0441\u043a\u0430     args = tail(expr)                 \/\/ \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b - \u043e\u0441\u0442\u0430\u0432\u0448\u0438\u0439\u0441\u044f \u0441\u043f\u0438\u0441\u043e\u043a     case op of         ..................            \/\/ \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f         ..................            \/\/ \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u0438\u043f\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438          ..................            \/\/ \u0438\u043b\u0438 \u043e\u0441\u043e\u0431\u043e\u0439 \u0444\u043e\u0440\u043c\u044b          ..................            \/\/ \u0438\u0445 \u0441\u043e\u0441\u0442\u0430\u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u043f\u0440\u0438\u043c\u0438\u0442\u0438\u0432\u043d\u044b\u0445         ...                           \/\/ \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0438 \u043a\u043e\u043c\u0430\u043d\u0434 \u044f\u0437\u044b\u043a\u0430         Function f:                   \/\/ \u0442\u0438\u043f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 - \u0444\u0443\u043d\u043a\u0446\u0438\u044f             newenv = subenv(args, f.clojure) \/\/ \u043d\u043e\u0432\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 - \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u043a\u0430\u0434\u0440             return eval(f.body, newenv)      \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0442\u0435\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438                                              \/\/ \u0432 \u044d\u0442\u043e\u043c \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 <\/code><\/pre>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u043c\u043d\u043e\u0433\u043e\u0435 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043e, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043c \u043d\u0435 \u043d\u0430\u0434\u043e \u0438 \u0434\u0430\u0436\u0435 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0432\u0435\u0441\u044c \u0441\u043f\u0438\u0441\u043e\u043a, \u0435\u0441\u043b\u0438 \u0442\u0438\u043f \u0435\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u2014 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u044d\u0442\u043e \u0443\u0436\u0435 \u0434\u0435\u0442\u0430\u043b\u0438. \u041c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438 \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c apply \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0432 \u043a\u0435\u0439\u0441 \u043f\u043e \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f\u043c \u043f\u0440\u044f\u043c\u043e \u0432 \u0442\u0435\u043b\u0435 eval, \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u043e. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0442\u043e, \u0447\u0442\u043e \u0432 \u044d\u0442\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u0445 \u043d\u0435\u0442 \u0446\u0438\u043a\u043b\u043e\u0432 \u0438 \u0434\u0435\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0441 \u0438\u0445 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u043c \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e \u0438 \u0438\u043c\u0435\u044e\u0449\u0435\u043c (\u0438\u043b\u0438 \u0438\u043c\u0435\u044e\u0449\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c) \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0438\u043f\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a \u043e\u0434\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a, \u0434\u0435\u0440\u0435\u0432\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0434\u043b\u044f \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0442\u0438\u043f\u044b-\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f (\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b\/\u043a\u043b\u0430\u0441\u0441\u044b \u0441 \u043f\u043e\u043b\u044f\u043c\u0438). \u0422\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c (\u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434) \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u044d\u0442\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u00ab\u0447\u0438\u0441\u0442\u044b\u0435\u00bb \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u0432\u0432\u043e\u0434-\u0432\u044b\u0432\u043e\u0434 \u043f\u043e\u0441\u0440\u0435\u0434\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0442\u043e \u0442\u0430\u043a\u043e\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u0430\u0436\u0435 \u0432 \u0447\u0438\u0441\u0442\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 Haskell, \u0438\u043b\u0438 \u0432 \u043b\u044e\u0431\u043e\u043c \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 \u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c\u0438 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438. \u041d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e, \u0438 \u043f\u0440\u0438 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0433\u043b\u0443\u0431\u0438\u043d\u0435 \u0441\u0442\u0435\u043a\u0430 \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f. \u0421\u0438\u0442\u0443\u0430\u0446\u0438\u044f \u0442\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u0443\u0441\u0443\u0433\u0443\u0431\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u044f\u0437\u044b\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u2014 TCO.<\/p>\n<h4>\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430<\/h4>\n<p>  \u0418\u043c\u0435\u043d\u043d\u043e \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u0442\u0435\u043a\u0430 \u044f \u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Java. \u041a\u0430\u0436\u0434\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0443 \u043c\u0435\u043d\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u043b\u043e\u0441\u044c \u0432 \u0441\u0432\u043e\u0435\u043c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435, \u0438 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0435\u0441\u044c\u043c\u0430 \u043d\u0435\u0432\u0435\u043b\u0438\u043a. \u041c\u043d\u0435 \u0432\u0438\u0434\u0435\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f:<\/p>\n<ul>\n<li>\u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0435\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u0430, \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u041d\u0435 \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0435\u043a\u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d, \u043d\u043e \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u0437\u0430\u0442\u0440\u0430\u0442.<\/li>\n<li>\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 (\u0441\u043c. SICP). \u041d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b, \u043d\u043e \u0434\u0443\u043c\u0430\u044e \u044d\u0442\u043e \u0440\u0435\u0448\u0438\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u043e\u0439 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438.<\/li>\n<li>\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u041f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441\u043e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442.<\/li>\n<li>\u043f\u0435\u0440\u0435\u043d\u043e\u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0441\u043e \u0441\u0442\u0435\u043a\u0430 \u0432 \u043a\u0443\u0447\u0443 \u2014 \u0442\u0440\u0430\u043c\u043f\u043b\u0438\u043d\u044b \u0438 \u0442.\u043f. \u041d\u0430\u0438\u0432\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e AST \u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u0432\u0435\u0441\u044c\u043c\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e\u0439, \u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u0443\u044e \u043d\u0435 \u043e\u0441\u0438\u043b\u0438\u043b.<\/li>\n<\/ul>\n<p>  \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0438 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u043d\u043e \u0432 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u043c \u0438\u0442\u043e\u0433\u0435 \u044f \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043d\u0430 \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u0435 \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0432 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 TCO, \u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u0442\u0435\u043a\u0430 \u043f\u043e\u0442\u043e\u043a\u0430 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f. \u0414\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u043b\u0441\u044f \u043a\u0430\u043a \u0438\u0433\u0440\u0443\u0448\u043a\u0430, pet project, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u0442\u043e \u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0438\u0441\u0441\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u0435\u043d\u044f \u043f\u043e\u043a\u0430 \u0443\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442. \u041d\u043e \u044f \u043d\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0430\u044e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u044e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u0443\u0447\u0448\u0435.<\/p>\n<h4>\u0420\u0435\u0448\u0435\u043d\u0438\u0435<\/h4>\n<p>   \u041a\u043b\u044e\u0447 \u043a \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b, \u043a\u043e\u0433\u0434\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043d\u043e\u0432\u0430 \u0438 \u0441\u043d\u043e\u0432\u0430 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e eval, \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u044f\u0441\u044c \u0432\u0441\u0435 \u0433\u043b\u0443\u0431\u0436\u0435 \u0432 \u0441\u0442\u0435\u043a, \u0430 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0443\u0442\u0440\u0438 \u043d\u0435\u0435 \u044f\u0432\u043d\u044b\u0439 \u0446\u0438\u043a\u043b, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u2014 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043d\u0430 2 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u2014 \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u00ab\u0441\u0442\u0440\u043e\u0433\u043e\u0435\u00bb \u0438 \u00ab\u043b\u0435\u043d\u0438\u0432\u043e\u0435\u00bb. \u041f\u0440\u0438 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043a\u0430\u043a \u0438 \u0440\u0430\u043d\u044c\u0448\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439, \u0430 \u043f\u0440\u0438 \u043b\u0435\u043d\u0438\u0432\u043e\u043c \u2014 \u043d\u0435\u043a\u0438\u0439 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u0430\u043c\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e (\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u0435\u0435 \u0442\u0435\u043b\u043e\u043c \u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c, \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 \u0435\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432), \u0438 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043e\u043d\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u0432\u044b\u0437\u0432\u0430\u043d\u0430. \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 FuncCall, \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u043a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 FuncCall (\u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u043c \u043d\u0435\u0442 JavaDocs \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441, \u043d\u043e \u0435\u0433\u043e \u0441\u0443\u0442\u044c \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u0430 \u0438 \u043f\u043e\u043d\u044f\u0442\u043d\u0430 \u0431\u0435\u0437 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439):<\/p>\n<pre><code class=\"java\">    \/** \u0442\u0438\u043f \u044f\u0437\u044b\u043a\u0430 Liscript - \u0444\u0443\u043d\u043a\u0446\u0438\u044f *\/     public static class Func {         \/** \u043e\u0434\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 *\/         public ConsList pars;         \/** \u0442\u0435\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 *\/         public Object body;         \/** \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f *\/         public Env clojure;          \/** \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440          * @param p \u043e\u0434\u043d\u043e\u0441\u0432\u044f\u0437\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u0435\u043d \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438          * @param b \u0442\u0435\u043b\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438          * @param c \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f          *\/         Func(ConsList p, Object b, Env c) { pars = p; body = b; clojure = c; }          \/** @return \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 *\/         @Override         public String toString() { return showVal(this); }     }      private static class FuncCall {         public Func f;         public HashMap&lt;String, Object&gt; args;          FuncCall(Func _f, HashMap&lt;String, Object&gt; _a) { f = _f; args = _a; }          @Override         public String toString() { return &quot;FUNCALL: &quot; + args.toString(); }     } <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0442\u044b \u043a\u0430\u0440\u0442\u0438\u043d\u044b \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u043c \u043a\u043e\u0434 \u043a\u043b\u0430\u0441\u0441\u0430 Env, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435, \u0441 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u043a\u043b\u0430\u0441\u0441 Env<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/**  * \u0418\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f - \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u0432\u044f\u0437\u0435\u0439: \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 - \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0438 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430  * \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435. \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u041d\u0415 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0439.  *\/ public class Env {     \/** \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u0432\u044f\u0437\u0435\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447 - \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 *\/     public HashMap&lt;String, Object&gt; map;     \/** \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 *\/     public Env parent;      \/** \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0435\u043c.      * @param m \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u044b\u0439 \u043a\u043b\u044e\u0447-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      * @param p \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435      *\/     Env (HashMap&lt;String, Object&gt; m, Env p) { map = m; parent = p; }      \/** \u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u043c \u0438 \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c      * \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c.      *\/     Env () { this(new HashMap&lt;String, Object&gt;(), null); }      \/** \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0438\u0437 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0433\u0434\u0435      * \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c.      * @param var \u0441\u0442\u0440\u043e\u043a\u0430-\u043a\u043b\u044e\u0447      * @param value \u043e\u0431\u044a\u0435\u043a\u0442-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      *\/     public void setVar(String var, Object value) {         Env env = this;         while (env != null) {             if (env.map.containsKey(var)) {env.map.put(var, value); break;}             env = env.parent;         }     }      \/** \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0432 \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0438\u0437 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0433\u0434\u0435      * \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c \u043a\u043b\u044e\u0447\u043e\u043c. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 - \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0430\u043c \u043a\u043b\u044e\u0447 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435      * \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.      * @param var \u0441\u0442\u0440\u043e\u043a\u0430-\u043a\u043b\u044e\u0447      * @return \u043e\u0431\u044a\u0435\u043a\u0442-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      *\/     public Object getVar(String var) {         Env env = this;         while (env != null) {             if (env.map.containsKey(var)) return env.map.get(var);             env = env.parent;         }         return var;     }      \/** \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0443 \u0432 \u0442\u0435\u043a\u0443\u0449\u0430\u0435\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435      * @param var \u0441\u0442\u0440\u043e\u043a\u0430-\u043a\u043b\u044e\u0447      * @param value \u043e\u0431\u044a\u0435\u043a\u0442-\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435      *\/     public void defVar(String var, Object value) {         this.map.put(var, value);     }      \/** \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0441\u0442\u0438\u043d\u0443, \u0435\u0441\u043b\u0438 \u0434\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 \u0441\u0432\u044f\u0437\u0430\u043d \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u043e\u0432\u0430\u0440\u0435 \u0438\u0437 \u0438\u0435\u0440\u0430\u0440\u0445\u0438\u0438 \u0432\u0432\u0435\u0440\u0445      *  \u043e\u0442 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e.      * @param var \u0441\u0442\u0440\u043e\u043a\u0430-\u043a\u043b\u044e\u0447      * @return \u0438\u0441\u0442\u0438\u043d\u0430\/\u043b\u043e\u0436\u044c      *\/     public boolean isBounded(String var) {         Env env = this;         while (env != null) {             if (env.map.containsKey(var)) return true;             env = env.parent;         }         return false;     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u2014 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0434\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0441\u0442 \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442 (\u0432 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u043e\u0431\u043e\u0439 \u0444\u043e\u0440\u043c\u044b) \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0442\u0430\u043a\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0439 FuncCall, \u0438 \u0442\u0443\u0442 \u0436\u0435 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u043f\u043e\u043a\u0430 \u0442\u0438\u043f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0435 \u0442\u0435\u043c \u0436\u0435 FuncCall, \u0430 \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0438\u043f \u2014 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0435\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0412 \u043c\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u0446\u0438\u043a\u043b\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u043e \u043e \u043d\u0438\u0445 \u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 Java \u0441\u0431\u043e\u0440\u0449\u0438\u043a \u043c\u0443\u0441\u043e\u0440\u0430. \u0417\u0430\u0442\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0438\u0442\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0438\u043c\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0432\u043d\u0443\u0442\u0440\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0438 \u0443 \u043d\u0430\u0441 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0440\u0430\u0441\u0442\u0438 \u0441\u0442\u0435\u043a \u043f\u0440\u0438 \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445. \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e\u043c \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0434\u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u044f\u0432\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b. \u0411\u0435\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043b\u0438\u0441\u044c \u043a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e, \u0441 \u043f\u043e\u0433\u0440\u0443\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u0441\u0442\u0435\u043a. \u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u0441\u0430\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u043b \u0438\u0445 \u0432 \u0446\u0438\u043a\u043b\u0435. \u042d\u0442\u043e \u0431\u044b\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 eval \u2014 \u0431\u0443\u043b\u0435\u0432\u0441\u043a\u0438\u0439 \u0444\u043b\u0430\u0433 strict \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \/ \u043b\u0435\u043d\u0438\u0432\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041b\u043e\u0433\u0438\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u2014 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0444\u043b\u0430\u0433\u0430 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0431\u044a\u0435\u043a\u0442 FuncCall \u0441 \u0434\u0430\u043d\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u043e \u043f\u0440\u0438 \u0441\u0442\u0440\u043e\u0433\u043e\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0443\u0442 \u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0446\u0438\u043a\u043b\u0435 \u043d\u043e \u0443\u0436\u0435 \u0441 \u043b\u0435\u043d\u0438\u0432\u044b\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c, \u043f\u043e\u043a\u0430 \u0442\u0438\u043f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f FuncCall. \u041f\u0440\u0438 \u043b\u0435\u043d\u0438\u0432\u043e\u043c \u0436\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u0441\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 FuncCall \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0438\u0433\u0434\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u043b\u0430\u0433\u0430 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0440\u0430\u0431\u043e\u0442\u044b, \u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c, \u0432 \u043a\u0430\u043a\u0438\u0445 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e, \u0430 \u0432 \u043a\u0430\u043a\u0438\u0445 \u2014 \u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0444\u043b\u0430\u0433\u0430 \u0432\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0435\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 (\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e\u0441\u0442\u044c \/ \u043b\u0435\u043d\u0438\u0432\u043e\u0441\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f). \u041d\u043e \u044d\u0442\u043e \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435 \u0442\u0440\u0443\u0434\u043d\u044b\u043c \u2014 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u0442\u0440\u043e\u0433\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u043a\u0440\u043e\u043c\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0441\u043f\u0438\u0441\u043a\u0430, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f (\u0441\u0430\u043c\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e) \u0438 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u043e\u0432\u044b\u0445 \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u2014 \u044d\u0442\u0438 3 \u043a\u0435\u0439\u0441\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043e \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0444\u043b\u0430\u0433\u0430, \u0432\u043e \u0432\u0441\u0435\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u0445 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b, \u0438 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043b \u0438\u0445, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u044b\u0435 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0438. \u0412 \u043a\u043e\u0434\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u0435\u0435 \u0441\u043b\u043e\u0432\u0435\u0441\u043d\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"java\">    else if (op instanceof Func) {         Func f = (Func)op;         \/\/ \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442 FuncCall         FuncCall fcall = new FuncCall(f, getMapArgsVals(d, io, env, f.pars, ls, true));         if (strict) {             v = fcall;             while (v instanceof FuncCall) {                 FuncCall fc = (FuncCall) v;                 v = eval(d, false, io, new Env(fc.args, fc.f.clojure), fc.f.body);             }             return v;         } else return fcall; <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0435 (\u0444\u0443\u043d\u043a\u0446\u0438\u0438 foldl \u0438 foldr \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0437\u0434\u0435\u0441\u044c \u0438\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438):<\/p>\n<pre><code class=\"lisp\">def a (list-from-to 1 100) =&gt; OK def b (list-from-to 1 100000) =&gt; OK defn foldl (f a l)     (cond (null? l) a           (foldl f (f (car l) a) (cdr l)) ) =&gt; OK defn foldr (f a l)     (cond (null? l) a           (f (car l) (foldr f a (cdr l))) ) =&gt; OK foldl + 0 a =&gt; 5050 foldr + 0 a =&gt; 5050 foldl + 0.0 b =&gt; 5.00005E9 foldr + 0.0 b =&gt; java.lang.StackOverflowError <\/code><\/pre>\n<p>  \u0421\u0440\u0435\u0434\u0438 \u043e\u0441\u043e\u0431\u044b\u0445 \u0444\u043e\u0440\u043c \u044f\u0437\u044b\u043a\u0430 \u0435\u0441\u0442\u044c \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u0430\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 tray, \u0432\u044b\u0432\u043e\u0434\u044f\u0449\u0430\u044f \u043d\u0430 \u043f\u0435\u0447\u0430\u0442\u044c \u0441\u0442\u0435\u043a \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0448\u0430\u0433\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0438 \u0443\u0440\u043e\u0432\u043d\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u00ab\u0432 \u0440\u0430\u0437\u0440\u0435\u0437\u0435\u00bb, \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u0445:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b (\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c) &#8212; \u0431\u0435\u0437 TCO<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lisp\">defn f (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))) =&gt; OK tray (f 5 1) =&gt;    1 \u2190 (f 5 1)     2 \u2190 f     2 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))     2 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))       3 \u2190 (&lt; n 2)         4 \u2190 n         4 \u2192 5       3 \u2192 false       3 \u2190 (f (- n 1) (* n a))         4 \u2190 f         4 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 5         4 \u2192 4         4 \u2190 (* n a)           5 \u2190 n           5 \u2192 5           5 \u2190 a           5 \u2192 1         4 \u2192 5         4 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))           5 \u2190 (&lt; n 2)             6 \u2190 n             6 \u2192 4           5 \u2192 false           5 \u2190 (f (- n 1) (* n a))             6 \u2190 f             6 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))             6 \u2190 (- n 1)               7 \u2190 n               7 \u2192 4             6 \u2192 3             6 \u2190 (* n a)               7 \u2190 n               7 \u2192 4               7 \u2190 a               7 \u2192 5             6 \u2192 20             6 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))               7 \u2190 (&lt; n 2)                 8 \u2190 n                 8 \u2192 3               7 \u2192 false               7 \u2190 (f (- n 1) (* n a))                 8 \u2190 f                 8 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))                 8 \u2190 (- n 1)                   9 \u2190 n                   9 \u2192 3                 8 \u2192 2                 8 \u2190 (* n a)                   9 \u2190 n                   9 \u2192 3                   9 \u2190 a                   9 \u2192 20                 8 \u2192 60                 8 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))                   9 \u2190 (&lt; n 2)                     10 \u2190 n                     10 \u2192 2                   9 \u2192 false                   9 \u2190 (f (- n 1) (* n a))                     10 \u2190 f                     10 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))                     10 \u2190 (- n 1)                       11 \u2190 n                       11 \u2192 2                     10 \u2192 1                     10 \u2190 (* n a)                       11 \u2190 n                       11 \u2192 2                       11 \u2190 a                       11 \u2192 60                     10 \u2192 120                     10 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))                       11 \u2190 (&lt; n 2)                         12 \u2190 n                         12 \u2192 1                       11 \u2192 true                       11 \u2190 a                       11 \u2192 120                     10 \u2192 120                   9 \u2192 120                 8 \u2192 120               7 \u2192 120             6 \u2192 120           5 \u2192 120         4 \u2192 120       3 \u2192 120     2 \u2192 120   1 \u2192 120 120 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438 (\u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u0430\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f) &#8212; \u0431\u0435\u0437 TCO<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lisp\">defn is-even (n) (cond (= n 0) true  (is-odd  (- n 1)) ) =&gt; OK defn is-odd  (n) (cond (= n 0) false (is-even (- n 1)) ) =&gt; OK tray (is-even 5) =&gt;    1 \u2190 (is-even 5)     2 \u2190 is-even     2 \u2192 (lambda (n) (cond (= n 0) true (is-odd (- n 1))))     2 \u2190 (cond (= n 0) true (is-odd (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 5       3 \u2192 false       3 \u2190 (is-odd (- n 1))         4 \u2190 is-odd         4 \u2192 (lambda (n) (cond (= n 0) false (is-even (- n 1))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 5         4 \u2192 4         4 \u2190 (cond (= n 0) false (is-even (- n 1)))           5 \u2190 (= n 0)             6 \u2190 n             6 \u2192 4           5 \u2192 false           5 \u2190 (is-even (- n 1))             6 \u2190 is-even             6 \u2192 (lambda (n) (cond (= n 0) true (is-odd (- n 1))))             6 \u2190 (- n 1)               7 \u2190 n               7 \u2192 4             6 \u2192 3             6 \u2190 (cond (= n 0) true (is-odd (- n 1)))               7 \u2190 (= n 0)                 8 \u2190 n                 8 \u2192 3               7 \u2192 false               7 \u2190 (is-odd (- n 1))                 8 \u2190 is-odd                 8 \u2192 (lambda (n) (cond (= n 0) false (is-even (- n 1))))                 8 \u2190 (- n 1)                   9 \u2190 n                   9 \u2192 3                 8 \u2192 2                 8 \u2190 (cond (= n 0) false (is-even (- n 1)))                   9 \u2190 (= n 0)                     10 \u2190 n                     10 \u2192 2                   9 \u2192 false                   9 \u2190 (is-even (- n 1))                     10 \u2190 is-even                     10 \u2192 (lambda (n) (cond (= n 0) true (is-odd (- n 1))))                     10 \u2190 (- n 1)                       11 \u2190 n                       11 \u2192 2                     10 \u2192 1                     10 \u2190 (cond (= n 0) true (is-odd (- n 1)))                       11 \u2190 (= n 0)                         12 \u2190 n                         12 \u2192 1                       11 \u2192 false                       11 \u2190 (is-odd (- n 1))                         12 \u2190 is-odd                         12 \u2192 (lambda (n) (cond (= n 0) false (is-even (- n 1))))                         12 \u2190 (- n 1)                           13 \u2190 n                           13 \u2192 1                         12 \u2192 0                         12 \u2190 (cond (= n 0) false (is-even (- n 1)))                           13 \u2190 (= n 0)                             14 \u2190 n                             14 \u2192 0                           13 \u2192 true                         12 \u2192 false                       11 \u2192 false                     10 \u2192 false                   9 \u2192 false                 8 \u2192 false               7 \u2192 false             6 \u2192 false           5 \u2192 false         4 \u2192 false       3 \u2192 false     2 \u2192 false   1 \u2192 false false <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0424\u0430\u043a\u0442\u043e\u0440\u0438\u0430\u043b (\u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0441 \u0430\u043a\u043a\u0443\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u043e\u043c) &#8212; c TCO<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lisp\">defn f (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))) =&gt; OK tray (f 5 1) =&gt;    1 \u2190 (f 5 1)     2 \u2190 f     2 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))     2 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))       3 \u2190 (&lt; n 2)         4 \u2190 n         4 \u2192 5       3 \u2192 false       3 \u2190 (f (- n 1) (* n a))         4 \u2190 f         4 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 5         4 \u2192 4         4 \u2190 (* n a)           5 \u2190 n           5 \u2192 5           5 \u2190 a           5 \u2192 1         4 \u2192 5       3 \u2192 FUNCALL: {a=5, n=4}     2 \u2192 FUNCALL: {a=5, n=4}     2 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))       3 \u2190 (&lt; n 2)         4 \u2190 n         4 \u2192 4       3 \u2192 false       3 \u2190 (f (- n 1) (* n a))         4 \u2190 f         4 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 4         4 \u2192 3         4 \u2190 (* n a)           5 \u2190 n           5 \u2192 4           5 \u2190 a           5 \u2192 5         4 \u2192 20       3 \u2192 FUNCALL: {a=20, n=3}     2 \u2192 FUNCALL: {a=20, n=3}     2 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))       3 \u2190 (&lt; n 2)         4 \u2190 n         4 \u2192 3       3 \u2192 false       3 \u2190 (f (- n 1) (* n a))         4 \u2190 f         4 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 3         4 \u2192 2         4 \u2190 (* n a)           5 \u2190 n           5 \u2192 3           5 \u2190 a           5 \u2192 20         4 \u2192 60       3 \u2192 FUNCALL: {a=60, n=2}     2 \u2192 FUNCALL: {a=60, n=2}     2 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))       3 \u2190 (&lt; n 2)         4 \u2190 n         4 \u2192 2       3 \u2192 false       3 \u2190 (f (- n 1) (* n a))         4 \u2190 f         4 \u2192 (lambda (n a) (cond (&lt; n 2) a (f (- n 1) (* n a))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 2         4 \u2192 1         4 \u2190 (* n a)           5 \u2190 n           5 \u2192 2           5 \u2190 a           5 \u2192 60         4 \u2192 120       3 \u2192 FUNCALL: {a=120, n=1}     2 \u2192 FUNCALL: {a=120, n=1}     2 \u2190 (cond (&lt; n 2) a (f (- n 1) (* n a)))       3 \u2190 (&lt; n 2)         4 \u2190 n         4 \u2192 1       3 \u2192 true       3 \u2190 a       3 \u2192 120     2 \u2192 120   1 \u2192 120 120 <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0447\u0435\u0442\u043d\u043e\u0441\u0442\u0438 (\u043f\u0435\u0440\u0435\u043a\u0440\u0435\u0441\u0442\u043d\u0430\u044f \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044f) &#8212; c TCO<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"lisp\">defn is-even (n) (cond (= n 0) true  (is-odd  (- n 1)) ) =&gt; OK defn is-odd  (n) (cond (= n 0) false (is-even (- n 1)) ) =&gt; OK tray (is-even 5) =&gt;    1 \u2190 (is-even 5)     2 \u2190 is-even     2 \u2192 (lambda (n) (cond (= n 0) true (is-odd (- n 1))))     2 \u2190 (cond (= n 0) true (is-odd (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 5       3 \u2192 false       3 \u2190 (is-odd (- n 1))         4 \u2190 is-odd         4 \u2192 (lambda (n) (cond (= n 0) false (is-even (- n 1))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 5         4 \u2192 4       3 \u2192 FUNCALL: {n=4}     2 \u2192 FUNCALL: {n=4}     2 \u2190 (cond (= n 0) false (is-even (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 4       3 \u2192 false       3 \u2190 (is-even (- n 1))         4 \u2190 is-even         4 \u2192 (lambda (n) (cond (= n 0) true (is-odd (- n 1))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 4         4 \u2192 3       3 \u2192 FUNCALL: {n=3}     2 \u2192 FUNCALL: {n=3}     2 \u2190 (cond (= n 0) true (is-odd (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 3       3 \u2192 false       3 \u2190 (is-odd (- n 1))         4 \u2190 is-odd         4 \u2192 (lambda (n) (cond (= n 0) false (is-even (- n 1))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 3         4 \u2192 2       3 \u2192 FUNCALL: {n=2}     2 \u2192 FUNCALL: {n=2}     2 \u2190 (cond (= n 0) false (is-even (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 2       3 \u2192 false       3 \u2190 (is-even (- n 1))         4 \u2190 is-even         4 \u2192 (lambda (n) (cond (= n 0) true (is-odd (- n 1))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 2         4 \u2192 1       3 \u2192 FUNCALL: {n=1}     2 \u2192 FUNCALL: {n=1}     2 \u2190 (cond (= n 0) true (is-odd (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 1       3 \u2192 false       3 \u2190 (is-odd (- n 1))         4 \u2190 is-odd         4 \u2192 (lambda (n) (cond (= n 0) false (is-even (- n 1))))         4 \u2190 (- n 1)           5 \u2190 n           5 \u2192 1         4 \u2192 0       3 \u2192 FUNCALL: {n=0}     2 \u2192 FUNCALL: {n=0}     2 \u2190 (cond (= n 0) false (is-even (- n 1)))       3 \u2190 (= n 0)         4 \u2190 n         4 \u2192 0       3 \u2192 true     2 \u2192 false   1 \u2192 false false <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 \u043f\u043e-\u043f\u0440\u0435\u0436\u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 <a href=\"https:\/\/github.com\/Ivana-\/Liscript-GUI-Java-Swing\">\u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 Github<\/a>.               <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habrahabr.ru\/post\/282093\/\"> https:\/\/habrahabr.ru\/post\/282093\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/58f\/f34\/a49\/58ff34a4919a4b6c9ea37656be866cda.png\"\/><\/p>\n<p>  \u0412 \u0441\u0432\u043e\u0435\u0439 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 <a href=\"https:\/\/habrahabr.ru\/post\/281859\/\">\u041f\u0438\u0448\u0435\u043c Lisp-\u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440 \u043d\u0430 Java<\/a> \u044f \u043a\u0440\u0430\u0442\u043a\u043e \u0438 \u0442\u0435\u0437\u0438\u0441\u043d\u043e \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043b \u043f\u0440\u043e \u0442\u043e, \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043f\u0430\u0440\u0443 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u0432 Lisp-\u043f\u043e\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u0432\u0430\u043b Liscript \u2014 \u043d\u0430 Haskell \u0438 \u043d\u0430 Java. \u041d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438 \u0432\u044b\u0434\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043d\u0435\u0442, \u043d\u043e \u0434\u043b\u044f \u043c\u0435\u043d\u044f \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u044b\u043c, \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u0440\u0435\u043c\u044f\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0435\u043d\u0438\u0435\u043c. \u0421\u0440\u0435\u0434\u0438 \u043f\u0440\u043e\u0447\u0438\u0445 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u044f \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u043b \u043f\u0440\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e TCO (tail call optimization) \u2014 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u043e\u043c \u0445\u0432\u043e\u0441\u0442\u043e\u0432\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u042d\u0442\u043e\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u0432\u044b\u0437\u0432\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430, \u0438 \u043f\u043e\u0441\u0442\u0443\u043f\u0438\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0435\u0433\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0447\u0442\u043e \u044f \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c. \u0418\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-278731","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=278731"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/278731\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=278731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=278731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=278731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}