{"id":372482,"date":"2024-05-21T05:13:18","date_gmt":"2024-05-21T05:13:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=372482"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=372482","title":{"rendered":"<span>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f: \u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u043a\u043e\u0442\u0442 \u0412\u043b\u0430\u0449\u0438\u043d \u2014 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0433\u0443\u0440\u0443 \u0432 \u043c\u0438\u0440\u0435 F#, \u043d\u0430\u043f\u0438\u0441\u0430\u0432\u0448\u0438\u0439 <a href=\"https:\/\/fsharpforfunandprofit.com\/\" rel=\"nofollow noopener noreferrer\">\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u044f\u0437\u044b\u043a<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432\u043c\u0435\u0441\u0442\u043e <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/fsharp\/\" rel=\"nofollow noopener noreferrer\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0430 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u043e\u0432 \u0434\u0430\u0432\u043d\u043e (\u0438 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c) <a href=\"https:\/\/github.com\/max-arshinov\/fsharpforfunandprofit.ru\" rel=\"nofollow noopener noreferrer\">\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f<\/a> \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0421\u043a\u043e\u0442\u0442\u0430 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u042f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0446\u0438\u043a\u043b\u0430, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0441\u0430\u043a\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u043c \u044f\u0437\u044b\u043a\u0430\u00a0\u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c. \u042d\u0442\u043e \u043a\u0430\u043a \u043c\u043e\u043d\u0430\u0434\u044b, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 .NET.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0441\u0430\u0439\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0443 \u0440\u0435\u0431\u044f\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<br \/>  \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u0441\u043b\u043e\u0432\u043e \u0430\u0432\u0442\u043e\u0440\u0443. \u041f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u2014 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p>\u041f\u043e \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c, \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e \u0442\u0430\u0439\u043d\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438 \u043a\u0430\u043a \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 (\u0438 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c <a href=\"\/about\/#banned\">\u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u043d\u0430 \u0431\u0443\u043a\u0432\u0443 \u041c<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0432\u043e\u0438\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0438\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0438\u043c\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f, \u0442\u0438\u043f\u0430\u043c\u0438-\u043e\u0431\u0451\u0440\u0442\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0438\u043c\u0435\u044e\u0442 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u044e \u0437\u0430\u0443\u043c\u043d\u043e\u0439 \u0448\u0442\u0443\u043a\u0438, \u0442\u0440\u0443\u0434\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0438\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u041b\u044e\u0431\u043e\u0439, \u043a\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 F# \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>seq{...}<\/code> \u0438\u043b\u0438 <code>async{...}<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e? \u041a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0437\u0430 \u043a\u0443\u043b\u0438\u0441\u0430\u043c\u0438?<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043c\u043d\u043e\u0433\u0438\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u0434\u0435\u043b\u0430\u044e\u0442 \u0432\u0435\u0441\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u0435\u0435 \u0437\u0430\u043f\u0443\u0442\u0430\u043d\u043d\u044b\u043c\u0438. \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u0432\u043e\u0435\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0439 \u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0441\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u044c. \u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435, \u0432\u0441\u0451 \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c, \u043d\u043e \u0442\u0435, \u043a\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u0439, \u0441\u0431\u0438\u0442\u044b \u0441 \u0442\u043e\u043b\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u043c\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u043c\u0441\u044f \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/dd233182.aspx\" rel=\"nofollow noopener noreferrer\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 MSDN<\/a>, \u0442\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0438\u043c, \u0447\u0442\u043e \u043e\u043d\u0430 \u0442\u043e\u0447\u043d\u0430, \u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0435\u0441\u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u043e\u043d\u0430 \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">{| let! pattern = expr in cexpr |}<\/code><\/pre>\n<p>  <\/p>\n<p>\u0442\u043e \u044d\u0442\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0441\u0430\u0445\u0430\u0440 \u0434\u043b\u044f \u0442\u0430\u043a\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">builder.Bind(expr, (fun pattern -> {| cexpr |}))<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e\u2026 \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0438 \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e?<\/p>\n<p>  <\/p>\n<p>\u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043a \u043a\u043e\u043d\u0446\u0443 \u0446\u0438\u043a\u043b\u0430, \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f, \u043f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d \u0432\u044b\u0448\u0435, \u0441\u0442\u0430\u043d\u0435\u0442 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439. \u041d\u0435 \u0432\u0435\u0440\u0438\u0442\u0435? \u0427\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430\u043b\u044c\u0448\u0435!<\/p>\n<p>  <\/p>\n<h2 id=\"vychislitelnye-vyrazheniya-na-praktike\">\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435<\/h2>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043e\u0434\u0438\u043d \u0438 \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0441 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0431\u0435\u0437 \u043d\u0438\u0445.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043a\u043e\u0434 \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433.<br \/>  \u041c\u044b \u043f\u0438\u0448\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0435\u0451 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let log p = printfn \"expression is %A\" p  let loggedWorkflow =     let x = 42     log x     let y = 43     log y     let z = x + y     log z     \/\/return     z<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">expression is 42 expression is 43 expression is 85<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0440\u0430\u0437\u0434\u0440\u0430\u0436\u0430\u0435\u0442, \u0447\u0442\u043e \u0432\u0441\u0451 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0432\u044b\u0437\u043e\u0432?<\/p>\n<p>  <\/p>\n<p>\u0425\u043e\u0440\u043e\u0448\u043e, \u0447\u0442\u043e \u0432\u044b \u0441\u043f\u0440\u043e\u0441\u0438\u043b\u0438\u2026 \u0412\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0441\u043f\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439. \u0412\u043e\u0442 \u043a\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f <code>LoggingBuilder<\/code>:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">type LoggingBuilder() =     let log p = printfn \"expression is %A\" p      member this.Bind(x, f) =         log x         f x      member this.Return(x) =         x<\/code><\/pre>\n<p>  <\/p>\n<p><em>\u041f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0435\u0441\u043f\u043e\u043a\u043e\u0439\u0442\u0435\u0441\u044c \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0442\u0430\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 <code>Bind<\/code> \u0438 <code>Return<\/code>\u00a0\u2014 \u043c\u044b \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043d\u0438\u043c \u043f\u043e\u0437\u0436\u0435.<\/em><\/p>\n<p>  <\/p>\n<blockquote><p><strong>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>, \u0447\u0442\u043e &#171;\u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c&#187; \u0438\u043b\u0438 &#171;\u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c&#187; (builder) \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e-\u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u0442\u0442\u0435\u0440\u043d <em>\u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c<\/em>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<\/p><\/blockquote>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 <code>logger<\/code>.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let logger = new LoggingBuilder()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u0438\u043c\u0435\u044f <code>logger<\/code>, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let loggedWorkflow =     logger         {         let! x = 42         let! y = 43         let! z = x + y         return z         }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0432 \u043a\u043e\u0434, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u043d\u043e, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 <code>logger{...}<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043d\u0430\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u043a\u043e\u0434\u0430.<\/p>\n<p>  <\/p>\n<h3 id=\"bezopasnoe-delenie\">\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u0434\u0435\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f \u0441 \u043e\u0434\u043d\u043e\u0439 \u0431\u043e\u0440\u043e\u0434\u0430\u0442\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0435\u0439.<\/p>\n<p>  <\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0441\u0435\u043b, \u043d\u043e \u043e\u0434\u043d\u043e \u0438\u0437 \u043d\u0438\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e \u043d\u0443\u043b\u044e. \u041a\u0430\u043a \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443? \u041c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0440\u043e\u0434\u043b\u0438\u0432\u043e. \u0421\u043a\u043e\u0440\u0435\u0435, \u0437\u0434\u0435\u0441\u044c \u043f\u043e\u0434\u043e\u0448\u0451\u043b \u0431\u044b \u0442\u0438\u043f <code>option<\/code>.<\/p>\n<p>  <\/p>\n<p>\u0412\u043d\u0430\u0447\u0430\u043b\u0435 \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u0435\u043b\u0438\u0442 \u0447\u0438\u0441\u043b\u0430 \u0434\u0440\u0443\u0433 \u043d\u0430 \u0434\u0440\u0443\u0433\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0442\u0438\u043f\u0430 <code>int option<\/code>. \u0415\u0441\u043b\u0438 \u0432\u0441\u0451 \u043f\u0440\u043e\u0448\u043b\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u043a\u043e\u0435 \u0442\u043e (<code>Some<\/code>) \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442\u00a0\u2014 \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e (<code>None<\/code>).<\/p>\n<p>  <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443 \u0438 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430.<\/p>\n<p>  <\/p>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0430 \u043f\u043e\u0442\u043e\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let divideBy bottom top =     if bottom = 0     then None     else Some(top\/bottom)<\/code><\/pre>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043f\u0435\u0440\u0432\u044b\u043c \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u044b \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0438 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0435 <code>12 |> divideBy 3<\/code>, \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u0447\u0435\u043c\u0443 \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u0438\u0445 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e. \u0412\u043e\u0442 \u043a\u043e\u0434, \u0433\u0434\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430 \u0442\u0440\u0438 \u0447\u0438\u0441\u043b\u0430.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let divideByWorkflow init x y z =     let a = init |> divideBy x     match a with     | None -> None  \/\/ \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f     | Some a' ->    \/\/ \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c         let b = a' |> divideBy y         match b with         | None -> None  \/\/ \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f         | Some b' ->    \/\/ \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c             let c = b' |> divideBy z             match c with             | None -> None  \/\/ \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u0441\u044f             | Some c' ->    \/\/ \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c                 \/\/ \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442                 Some c'<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0437\u0434\u0435\u0441\u044c \u043c\u044b \u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let good = divideByWorkflow 12 3 2 1 let bad = divideByWorkflow 12 3 0 1<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0446\u0435\u043f\u043e\u0447\u043a\u0430 \u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 \u0432\u044b\u0437\u043e\u0432\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u0448\u0430\u0433\u0435 \u0438 \u0432\u0435\u0440\u043d\u0451\u0442 <code>None<\/code> \u043a\u0430\u043a \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432\u0441\u0435\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e <em>\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0438\u043a\u043e\u043c<\/em> \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0442\u0438\u043f <code>int option<\/code>. \u041e\u043d\u043e \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0446\u0435\u043b\u044b\u043c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u043e\u0433\u0434\u0430 \u043d\u0435\u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0435\u043c\u0443 \u043e\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0440\u0430\u0432\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0448\u0438\u0431\u043a\u0438. \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u043d\u0443\u0442\u0440\u0438 \u0446\u0435\u043f\u043e\u0447\u043a\u0438\u00a0\u2014 <code>option<\/code>\u00a0\u2014 \u044d\u0442\u043e \u0442\u043e\u0442 \u0436\u0435 \u0442\u0438\u043f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0432 \u043a\u043e\u043d\u0446\u0435. \u0417\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u044d\u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442\u00a0\u2014 \u043c\u044b \u0432\u0435\u0440\u043d\u0451\u043c\u0441\u044f \u043a \u043d\u0435\u043c\u0443 \u043f\u043e\u0437\u0436\u0435.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0432\u0441\u0435 \u044d\u0442\u0438 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0438 \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0443\u0436\u0430\u0441\u043d\u043e! \u0421\u043c\u043e\u0433\u0443\u0442 \u043b\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0442 \u043d\u0438\u0445?<\/p>\n<p>  <\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f (<code>MaybeBuilder<\/code>) \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 (<code>maybe<\/code>).<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">type MaybeBuilder() =      member this.Bind(x, f) =         match x with         | None -> None         | Some a -> f a      member this.Return(x) =         Some x  let maybe = new MaybeBuilder()<\/code><\/pre>\n<p>  <\/p>\n<p>\u042f \u0434\u0430\u043b \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 <code>MaybeBuilder<\/code> \u0432\u043c\u0435\u0441\u0442\u043e <code>divideByBuilder<\/code>, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441 \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u044b \u0440\u0435\u0448\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0447\u0430\u0441\u0442\u043e, \u0438 \u0441\u043b\u043e\u0432\u043e <code>maybe<\/code>\u00a0\u2014 \u0443\u0441\u0442\u043e\u044f\u0448\u0435\u0435\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435<br \/>  \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0448\u0442\u0443\u043a\u0438.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0448\u0430\u0433\u0438 \u0434\u043b\u044f <code>maybe<\/code>, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0435\u043c \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u0434 \u0441 \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let divideByWorkflow init x y z =     maybe         {         let! a = init |> divideBy x         let! b = a |> divideBy y         let! c = b |> divideBy z         return c         }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0412\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u043f\u0440\u0438\u044f\u0442\u043d\u0435\u0435! \u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>maybe<\/code> \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043a\u0440\u044b\u043b\u043e \u0432\u0435\u0442\u0432\u043b\u0435\u043d\u0438\u044f!<\/p>\n<p>  <\/p>\n<p>\u0418, \u0435\u0441\u043b\u0438 \u043c\u044b \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u043e\u0434, \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u0447\u0442\u043e \u0438 \u0440\u0430\u043d\u044c\u0448\u0435:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let good = divideByWorkflow 12 3 2 1 let bad = divideByWorkflow 12 3 0 1<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"cepochka-proverok-v-vetkah-else\">\u0426\u0435\u043f\u043e\u0447\u043a\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 &#171;\u0432\u0435\u0442\u043a\u0430\u0445 else&#187;<\/h3>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u0448\u0430\u0433 \u0431\u044b\u043b \u0443\u0434\u0430\u0447\u043d\u044b\u043c.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0431\u044b\u0432\u0430\u0435\u0442 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u0442\u043e\u043a \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 &#171;\u0432\u0435\u0442\u043a\u0430\u0445 else&#187;. \u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0435 \u0438, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u0438\u0441\u0442\u0438\u043d\u043d\u043e, \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438. \u0412 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0432\u0442\u043e\u0440\u043e\u0435, \u0430 \u0435\u0441\u043b\u0438 \u0438 \u043e\u043d\u043e \u043b\u043e\u0436\u043d\u043e, \u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u0442\u0440\u0435\u0442\u044c\u0435, \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0421\u043a\u0430\u0436\u0435\u043c, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u043d\u0430\u0439\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0443. \u041a\u0430\u0436\u0434\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u044c\u0441\u044f \u0443\u0441\u043f\u0435\u0445\u043e\u043c \u0438\u043b\u0438 \u043d\u0435\u0443\u0434\u0430\u0447\u0435\u0439, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let map1 = [ (\"1\",\"One\"); (\"2\",\"Two\") ] |> Map.ofList let map2 = [ (\"A\",\"Alice\"); (\"B\",\"Bob\") ] |> Map.ofList let map3 = [ (\"CA\",\"California\"); (\"NY\",\"New York\") ] |> Map.ofList  let multiLookup key =     match map1.TryFind key with     | Some result1 -> Some result1   \/\/ \u043d\u0430\u0448\u043b\u0438     | None ->   \/\/ \u043d\u0435 \u043d\u0430\u0448\u043b\u0438         match map2.TryFind key with         | Some result2 -> Some result2 \/\/ \u043d\u0430\u0448\u043b\u0438         | None ->   \/\/ \u043d\u0435 \u043d\u0430\u0448\u043b\u0438             match map3.TryFind key with             | Some result3 -> Some result3  \/\/ \u043d\u0430\u0448\u043b\u0438             | None -> None \/\/ \u043d\u0435 \u043d\u0430\u0448\u043b\u0438<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 F# \u0432\u0441\u0451 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c, \u043c\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435, \u043d\u0430\u043c \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0443\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0432 \u043e\u0434\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">multiLookup \"A\" |> printfn \"Result for A is %A\" multiLookup \"CA\" |> printfn \"Result for CA is %A\" multiLookup \"X\" |> printfn \"Result for X is %A\"<\/code><\/pre>\n<p>  <\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0448 \u043a\u043e\u0434?<\/p>\n<p>  <\/p>\n<p>\u0414\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e. \u0412\u043e\u0442 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c \u0434\u043b\u044f &#171;\u0432\u0435\u0442\u043e\u043a else&#187;, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">type OrElseBuilder() =     member this.ReturnFrom(x) = x     member this.Combine (a,b) =         match a with         | Some _ -> a  \/\/ \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c a         | None -> b    \/\/ \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c b     member this.Delay(f) = f()  let orElse = new OrElseBuilder()<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 \u0432\u043e\u0442 \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let map1 = [ (\"1\",\"One\"); (\"2\",\"Two\") ] |> Map.ofList let map2 = [ (\"A\",\"Alice\"); (\"B\",\"Bob\") ] |> Map.ofList let map3 = [ (\"CA\",\"California\"); (\"NY\",\"New York\") ] |> Map.ofList  let multiLookup key = orElse {     return! map1.TryFind key     return! map2.TryFind key     return! map3.TryFind key     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418 \u0441\u043d\u043e\u0432\u0430 \u0443\u0431\u0435\u0434\u0438\u043c\u0441\u044f, \u0447\u0442\u043e \u043a\u043e\u0434 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">multiLookup \"A\" |> printfn \"Result for A is %A\" multiLookup \"CA\" |> printfn \"Result for CA is %A\" multiLookup \"X\" |> printfn \"Result for X is %A\"<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"asinhronnye-vyzovy-s-funkciyami-obratnogo-vyzova\">\u0410\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430<\/h3>\n<p>  <\/p>\n<p>\u0418 \u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0432\u0437\u0433\u043b\u044f\u043d\u0435\u043c \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430. \u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0432 .NET \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms228972.aspx\" rel=\"nofollow noopener noreferrer\">\u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430 AsyncCallback<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0435\u0431\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u044d\u0442\u0443 \u0442\u0435\u0445\u043d\u0438\u043a\u0443:<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">open System.Net let req1 = HttpWebRequest.Create(\"http:\/\/fsharp.org\") let req2 = HttpWebRequest.Create(\"http:\/\/google.com\") let req3 = HttpWebRequest.Create(\"http:\/\/bing.com\")  req1.BeginGetResponse((fun r1 ->     use resp1 = req1.EndGetResponse(r1)     printfn \"Downloaded %O\" resp1.ResponseUri      req2.BeginGetResponse((fun r2 ->         use resp2 = req2.EndGetResponse(r2)         printfn \"Downloaded %O\" resp2.ResponseUri          req3.BeginGetResponse((fun r3 ->             use resp3 = req3.EndGetResponse(r3)             printfn \"Downloaded %O\" resp3.ResponseUri              ),null) |> ignore         ),null) |> ignore     ),null) |> ignore<\/code><\/pre>\n<p>  <\/p>\n<p>\u041c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 <code>BeginGetResponse<\/code> \u0438 <code>EndGetResponse<\/code>, \u0438 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0412\u0430\u0436\u043d\u044b\u0439 \u043a\u043e\u0434 (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u043f\u0435\u0447\u0430\u0442\u0438) \u0442\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0444\u043e\u043d\u0435 \u043b\u043e\u0433\u0438\u043a\u0438 \u0441 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c\u0438 \u0432\u044b\u0437\u043e\u0432\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430\u00a0\u2014 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u0443 \u043d\u0435\u0451 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u00a0\u2014 <a href=\"http:\/\/raynos.github.com\/presentation\/shower\/controlflow.htm?full#PyramidOfDoom\" rel=\"nofollow noopener noreferrer\">&#171;\u041f\u0438\u0440\u0430\u043c\u0438\u0434\u0430 \u0421\u0443\u0434\u044c\u0431\u044b&#187;<\/a> (\u0445\u043e\u0442\u044f, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, <a href=\"https:\/\/web.archive.org\/web\/20170609232359\/http:\/\/adamghill.com\/callbacks-considered-a-smell\/\" rel=\"nofollow noopener noreferrer\">\u043d\u0438 \u043e\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u044b\u043c<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0430\u043c \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u0434 \u043d\u0430 F#, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0432 F# \u0435\u0441\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u043d\u043d\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 <code>async<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0438 \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043b\u043e\u0433\u0438\u043a\u0443 \u0438 \u0438\u0437\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043e\u0434 \u043e\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 (\u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043f\u043b\u043e\u0441\u043a\u0438\u043c).<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">open System.Net let req1 = HttpWebRequest.Create(\"http:\/\/fsharp.org\") let req2 = HttpWebRequest.Create(\"http:\/\/google.com\") let req3 = HttpWebRequest.Create(\"http:\/\/bing.com\")  async {     use! resp1 = req1.AsyncGetResponse()     printfn \"Downloaded %O\" resp1.ResponseUri      use! resp2 = req2.AsyncGetResponse()     printfn \"Downloaded %O\" resp2.ResponseUri      use! resp3 = req3.AsyncGetResponse()     printfn \"Downloaded %O\" resp3.ResponseUri      } |> Async.RunSynchronously<\/code><\/pre>\n<p>  <\/p>\n<p>\u041f\u043e\u0437\u0436\u0435 \u0432 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0443\u0441\u0442\u0440\u043e\u0435\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441 <code>async<\/code>.<\/p>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043b\u0438\u0441\u044c \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043a\u0430\u043a &#171;\u0434\u043e&#187;, \u0442\u0430\u043a \u0438 &#171;\u043f\u043e\u0441\u043b\u0435&#187;. \u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<ul>\n<li>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u043b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b, \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0432\u0448\u0438\u0435 \u043a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0433 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439.<\/li>\n<li>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043e\u0448\u0438\u0431\u043a\u0430, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u043b\u0438\u0441\u044c \u043d\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438.<\/li>\n<li>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c\u0438 \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043f\u0440\u0435\u0440\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u043b\u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/li>\n<li>\u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0441\u043f\u0440\u044f\u0442\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0432\u044b\u0437\u043e\u0432\u0430 \u0438 \u0438\u0437\u0430\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 &#171;\u043f\u0438\u0440\u0430\u043c\u0438\u0434\u044b \u0441\u0443\u0434\u044c\u0431\u044b&#187;.<\/li>\n<\/ul>\n<p>  <\/p>\n<p>\u041e\u0431\u0449\u0438\u043c \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u044d\u0442\u0438\u043c\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u0441\u0446\u0435\u043d\u043e\u0439, \u043c\u0435\u0436\u0434\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0448\u0430\u0433\u0430\u043c\u0438.<\/p>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u043b\u043e\u0445\u0430\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u044f, \u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445, \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u0432 SVN \u0438\u043b\u0438 git: \u0438\u043b\u0438 \u043a\u0430\u043a \u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u044d\u0442\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e, \u0447\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f: \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0441\u0432\u044f\u0437\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 \u0437\u0430\u0434\u043d\u0435\u043c \u043f\u043b\u0430\u043d\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0441\u0444\u043e\u043a\u0443\u0441\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u043b\u0430\u043d\u0435, \u0433\u0434\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u0439 \u043a\u043e\u0434.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f &#171;\u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f&#187;? \u0427\u0442\u043e \u0436\u0435, \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e\u0431 \u043e\u0441\u043e\u0431\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e \u043a\u0440\u0430\u0439\u043d\u0435\u0439 \u043c\u0435\u0440\u0435 \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432\u0441\u0451 \u044f\u0441\u043d\u043e. \u042f \u0432\u0435\u0440\u044e, \u0447\u0442\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 F# \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0435\u043b\u0430 \u0434\u0430\u0442\u044c \u0438\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 &#171;\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f-\u043a\u043e\u0442\u043e\u0440\u044b\u0435-\u0434\u0435\u043b\u0430\u044e\u0442-\u0447\u0442\u043e-\u0442\u043e-\u043d\u0430-\u0437\u0430\u0434\u043d\u0435\u043c-\u043f\u043b\u0430\u043d\u0435-\u043c\u0435\u0436\u0434\u0443-\u043a\u0430\u0436\u0434\u044b\u043c-\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435\u043c&#187;, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043e\u043d\u0438 \u043f\u043e\u0447\u0435\u043c\u0443-\u0442\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0433\u0440\u043e\u043c\u043e\u0437\u0434\u043a\u043e \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u0430\u0442\u044c \u0438\u043c \u0438\u043c\u044f &#171;\u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f&#187;.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u0440\u0430\u0437\u043d\u0438\u0446\u0435 \u043c\u0435\u0436\u0434\u0443 &#171;\u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c&#187; (computation expression) \u0438 &#171;\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u043c&#187; (workflow). \u041a\u043e\u0433\u0434\u0430 \u044f \u0433\u043e\u0432\u043e\u0440\u044e &#171;\u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435&#187;, \u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0438\u0437 <code>{...}<\/code> \u0438 <code>let!<\/code>. &#171;\u041f\u0440\u043e\u0446\u0435\u0441\u0441&#187; \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0445 \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0442\u044c.<br \/>  \u041d\u0435 \u0432\u0441\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e &#171;\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 <code>async<\/code>&#187; \u0438\u043b\u0438 &#171;\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 <code>maybe<\/code>&#171;, \u043d\u043e &#171;\u043f\u0440\u043e\u0446\u0435\u0441\u0441 <code>seq<\/code>&#187; \u0437\u0432\u0443\u0447\u0438\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<p>  <\/p>\n<p>\u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0438\u0436\u0435 \u044f \u0431\u044b \u0441\u043a\u0430\u0437\u0430\u043b, \u0447\u0442\u043e <code>maybe<\/code>\u00a0\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c, \u0430 \u043a\u043e\u0434 \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445 <code>{ let! a = .... return c }<\/code> \u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">maybe     {     let! a = x |> divideBy y     let! b = a |> divideBy w     let! c = b |> divideBy z     return c     }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0432\u044b, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u043f\u0435\u0440\u0432\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f\u043c\u0438 (continuations). \u042d\u0442\u043e \u0442\u0435\u043c\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \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:\/\/habr.com\/ru\/articles\/804631\/\"> https:\/\/habr.com\/ru\/articles\/804631\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0421\u043a\u043e\u0442\u0442 \u0412\u043b\u0430\u0449\u0438\u043d \u2014 \u0431\u0435\u0437\u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0439 \u0433\u0443\u0440\u0443 \u0432 \u043c\u0438\u0440\u0435 F#, \u043d\u0430\u043f\u0438\u0441\u0430\u0432\u0448\u0438\u0439 <a href=\"https:\/\/fsharpforfunandprofit.com\/\" rel=\"nofollow noopener noreferrer\">\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u044f\u0437\u044b\u043a<\/a>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043d\u043e\u0432\u0438\u0447\u043a\u0430\u043c \u0432\u043c\u0435\u0441\u0442\u043e <a href=\"https:\/\/learn.microsoft.com\/en-us\/dotnet\/fsharp\/\" rel=\"nofollow noopener noreferrer\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430<\/a>.<\/p>\n<p>  <\/p>\n<p>\u0413\u0440\u0443\u043f\u043f\u0430 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442\u043e\u0432 \u0434\u0430\u0432\u043d\u043e (\u0438 \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c \u0443\u0441\u043f\u0435\u0445\u043e\u043c) <a href=\"https:\/\/github.com\/max-arshinov\/fsharpforfunandprofit.ru\" rel=\"nofollow noopener noreferrer\">\u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f<\/a> \u043f\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0421\u043a\u043e\u0442\u0442\u0430 \u043d\u0430 \u0440\u0443\u0441\u0441\u043a\u0438\u0439.<\/p>\n<p>  <\/p>\n<p>\u042f \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u044e \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0446\u0438\u043a\u043b\u0430, \u043f\u043e\u0441\u0432\u044f\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0441\u0430\u043a\u0440\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0435\u043c \u044f\u0437\u044b\u043a\u0430\u00a0\u2014 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c. \u042d\u0442\u043e \u043a\u0430\u043a \u043c\u043e\u043d\u0430\u0434\u044b, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 .NET.<\/p>\n<p>  <\/p>\n<p>\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u043d\u0430\u043c \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 \u0440\u0443\u0441\u0441\u043a\u0438\u0439 \u0441\u0430\u0439\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u043e\u043f\u0440\u043e\u0441\u0438\u043b \u0443 \u0440\u0435\u0431\u044f\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0446\u0438\u043a\u043b \u043d\u0430 \u0425\u0430\u0431\u0440\u0435.<br \/>  \u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0439 \u0438 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0438\u043c \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442 \u0441\u043b\u043e\u0432\u043e \u0430\u0432\u0442\u043e\u0440\u0443. \u041f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u2014 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u0446\u0438\u043a\u043b\u0430.<\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<p>\u041f\u043e \u043c\u043d\u043e\u0433\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u043e\u0441\u044c\u0431\u0430\u043c, \u043c\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u0440\u043e \u0442\u0430\u0439\u043d\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0438 \u043a\u0430\u043a \u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 (\u0438 \u044f \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u0438\u0437\u0431\u0435\u0433\u0430\u0442\u044c <a href=\"\/about\/#banned\">\u0437\u0430\u043f\u0440\u0435\u0449\u0451\u043d\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u043d\u0430 \u0431\u0443\u043a\u0432\u0443 \u041c<\/a>).<\/p>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0446\u0438\u043a\u043b\u0435 \u0441\u0442\u0430\u0442\u0435\u0439 \u0432\u044b \u0443\u0437\u043d\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u0430\u043a \u0438\u0445 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0432\u043e\u0438\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0449\u0438\u0445 \u043f\u0430\u0442\u0442\u0435\u0440\u043d\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 \u043d\u0438\u043c\u0438. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u044f, \u0442\u0438\u043f\u0430\u043c\u0438-\u043e\u0431\u0451\u0440\u0442\u043a\u0430\u043c\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u043c.<\/p>\n<p>  <\/p>\n<h2 id=\"vvedenie\">\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 \u0438\u043c\u0435\u044e\u0442 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u044e \u0437\u0430\u0443\u043c\u043d\u043e\u0439 \u0448\u0442\u0443\u043a\u0438, \u0442\u0440\u0443\u0434\u043d\u043e\u0439 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f.<\/p>\n<p>  <\/p>\n<p>\u0421 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u0438\u0445 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c. \u041b\u044e\u0431\u043e\u0439, \u043a\u0442\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043a\u043e\u0434\u0430 \u043d\u0430 F# \u043d\u0430\u0432\u0435\u0440\u043d\u044f\u043a\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <code>seq{...}<\/code> \u0438\u043b\u0438 <code>async{...}<\/code>.<\/p>\n<p>  <\/p>\n<p>\u041d\u043e \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e? \u041a\u0430\u043a \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0437\u0430 \u043a\u0443\u043b\u0438\u0441\u0430\u043c\u0438?<\/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-372482","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372482","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=372482"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/372482\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=372482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=372482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=372482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}