{"id":319140,"date":"2021-03-06T15:00:18","date_gmt":"2021-03-06T15:00:18","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=319140"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=319140","title":{"rendered":"\u0414\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u0441 F#"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vv\/oe\/yk\/vvoeyksgewqqslge4ny49da8_3g.png\"><\/p>\n<p>  \u0410 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430? \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043d\u0435\u0434\u0435\u043b\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0430\u043b\u044c\u043d\u043e\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u0438 \u0442\u0443\u043f\u044b\u043c\u0438 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438?\u00a0<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/545740\/\">\u041a\u0410\u0420\u0422\u0418\u041d\u041a\u0410 \u0414\u041e \u041a\u0410\u0422\u0410<\/a><\/p>\n<p>  \u041d\u0430 \u0434\u043d\u044f\u0445 \u044f \u043f\u043e\u043d\u044f\u043b F#, \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043c\u044b\u0441\u043b\u044c, \u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0437\u0430 \u044f\u0437\u044b\u043a\u043e\u043c.\u00a0<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u044b \u043d\u0435 Powershell?<\/font><\/h2>\n<p>  \u041f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c, \u043a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0443\u0441\u0435\u043b\u0441\u044f \u0437\u0430 F#, \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0432\u0448\u0438\u0441\u044c \u0441\u043e \u0441\u0442\u0430\u0439\u043b \u0433\u0430\u0439\u0434\u043e\u043c, \u043d\u0430\u0447\u0430\u043b \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 Powershell, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e. \u0412 \u044f\u0437\u044b\u043a\u0435 \u0435\u0441\u0442\u044c \u043f\u0430\u0439\u043f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440, \u043d\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u043d\u0430 Powershell. \u0414\u0430?<\/p>\n<p>  \u0412\u043e\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432\u043e\u0437\u044c\u043c\u0443 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0443 \u043a\u043e\u0440\u043d\u0435\u0432\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0444\u0430\u0439\u043b\u0430, \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0431\u043e\u0433\u043e\u043c\u0435\u0440\u0437\u043a\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u044b \u043a\u043b\u0430\u0441\u0441\u044b \u0438\u0437 .net.<\/p>\n<p>  \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u0431\u0435\u0440\u0435\u043c \u043f\u0443\u0442\u044c, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u043e\u043c\u043e\u0449\u044c\u044e split, \u043f\u043e System.IO.Path.DirectorySeparatorChar, \u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0438 \u0434\u0435\u043b\u0430\u0435\u043c .trim.<\/p>\n<p>  \u0414\u0430, \u043d\u0430 F# \u0435\u0441\u0442\u044c \u0432\u0435\u0441\u044c .net \u0430 \u0432 .net \u0432\u0441\u0451 \u0435\u0441\u0442\u044c, \u043d\u043e \u044f \u043d\u0435 \u0437\u0430 \u044d\u0442\u0438\u043c \u0441\u0435\u043b. \u0412\u043e\u0442 \u0442\u0430\u043a \u044d\u0442\u043e\u0442 \u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430 Powershell:<\/p>\n<pre><code class=\"powershell\">$Path\u00a0=\u00a0\u00abC:\\users\\test\\folder\u00bb $Trimer\u00a0=\u00a0$Path.Split(\u00ab\\\u00bb)[$Path.Split(\u00ab\\\u00bb).Count\u00a0-\u00a01] $Path.Trim($Trimer)<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u043a\u043e\u0434\u0435 \u043c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u043e\u043d \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0436\u0430\u0441\u0435\u043d, \u043d\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0435\u0433\u043e \u044f \u0438 \u0431\u0443\u0434\u0443 \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0421\u0435\u0439\u0447\u0430\u0441 <i>\u043f\u0440\u043e\u0441\u0442\u043e<\/i> \u043f\u0435\u0440\u0435\u043f\u0438\u0448\u0443, \u043d\u0443 \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u0439\u0442\u0438 \u043d\u0435 \u0442\u0430\u043a?<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u041d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0443\u0436 \u0438 \u0443\u043c\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440<\/font><\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">let splitPath inputObject: string =     let q = inputObject.Split(System.IO.Path.DirectorySeparatorChar)      q<\/code><\/pre>\n<p>  \u041d\u0430\u043f\u0438\u0441\u0430\u0432 \u0434\u0432\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430, \u0441\u0440\u0430\u0437\u0443 \u043f\u043e\u043b\u0443\u0447\u0430\u044e \u043e\u0448\u0438\u0431\u043a\u0443:<\/p>\n<p>  <i>FS0072 \u041f\u043e\u0438\u0441\u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0434\u043e \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0435\u0440\u0435\u0434 \u0434\u0430\u043d\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u044f \u0442\u0438\u043f\u0430, \u0441 \u0446\u0435\u043b\u044c\u044e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044c \u043f\u043e\u0438\u0441\u043a.<\/i><\/p>\n<p>  \u041d\u0430 \u0440\u0430\u0437\u0431\u043e\u0440\u043a\u0443 \u0443 \u043c\u0435\u043d\u044f \u0443\u0448\u043b\u043e \u043c\u0438\u043d\u0443\u0442 30, \u044f \u043d\u0435 \u043c\u043e\u0433 \u043f\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0441\u043c\u043e\u0433 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0447\u0442\u043e \u0438\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u043e \u0441\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 \u0438\u0437 \u0442\u0438\u043f\u0430 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430.\u00a0<\/p>\n<pre><code class=\"plaintext\">let splitPath inputObject: string =     let mutable inputObject : string = inputObject     let q = inputObject.Split(System.IO.Path.DirectorySeparatorChar)      q<\/code><\/pre>\n<p>  \u041f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0437\u0430\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u0438\u043f\u044b \u043f\u0440\u044f\u043c\u043e \u0432\u043d\u0443\u0442\u0440\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043b\u0438\u0448\u043d\u0438\u0439 \u0440\u0430\u0437 \u043a\u043e\u043f\u0438\u0440\u0443\u044f \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435.\u00a0<\/p>\n<h3><font color=\"#3AC1EF\">\u258dLInq<\/font><\/h3>\n<p>  \u041a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u043c\u0435\u043d\u044f \u2013 \u043d\u0443 \u0438 \u043b\u0430\u0434\u043d\u043e. \u0422\u0430\u043a\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0435 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442 \u043c\u0435\u043d\u044f \u043e\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0442\u044b\u043b\u044f.<\/p>\n<p>  \u0427\u0430\u0441\u0442\u044c \u043c\u043e\u0435\u0439 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0443\u043c\u043a\u0438 \u043b\u0435\u0436\u0430\u043b\u0430 \u043d\u0430 Linq, \u043d\u0430 Trim \u0438 Last. \u041d\u043e Trim \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043e string, \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 c Char, \u0442\u043e \u0435\u0441\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043b\u0438\u0441\u0442\u0430 \u0438 \u043e\u0442\u043a\u0443\u0441\u044b\u0432\u0430\u0442\u044c \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e \u0441\u0438\u043c\u0432\u043e\u043b\u0443.\u00a0<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u041d\u0435\u0442 ++<\/font><\/h3>\n<p>  Linq \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u044f \u0445\u043e\u0447\u0443 \u2013 \u043d\u0443 \u0438 \u043d\u0435 \u043d\u0430\u0434\u043e. \u042f \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u044e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435 \u0438 \u0432\u044b\u0431\u0435\u0440\u0443 \u043d\u0443\u0436\u043d\u044b\u0439, \u0430 \u043f\u043e\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u0435\u0440\u043d\u0443 \u0435\u0433\u043e, \u0440\u0430\u0437\u043e\u0431\u044c\u044e \u043d\u0430 char[] \u0438 \u043e\u0431\u0440\u0435\u0436\u0443 \u0442\u0430\u043a\u0438 \u0441\u0442\u0440\u0438\u043d\u0433\u0443!<\/p>\n<p>  \u041d\u043e \u043a\u0430\u043a \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u043d\u0435 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u044e, \u0434\u0430\u0436\u0435 \u0432 \u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u043b\u044c\u0437\u044f \u0431\u0435\u0437 \u0441\u0438\u043b\u044c\u043d\u043e\u0439 \u0433\u043e\u043b\u043e\u0432\u043d\u043e\u0439 \u0431\u043e\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0447\u0435\u0442\u0447\u0438\u043a. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u043e \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u044f \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044e \u0438 \u043d\u0430\u0447\u0430\u043b \u0438\u0437\u0443\u0447\u0430\u0442\u044c \u044f\u0437\u044b\u043a.<\/p>\n<h2><font color=\"#3AC1EF\">F#, \u043d\u0443 \u0437\u0430\u0447\u0435\u043c?<\/font><\/h2>\n<p>  \u0410 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 \u044f \u043d\u0430\u0447\u0430\u043b \u0441 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0447\u0443\u0436\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043b\u0435\u043a\u0446\u0438\u0439 \u043e\u0442 \u043a\u0440\u0443\u0442\u044b\u0445 \u043c\u0443\u0436\u0438\u043a\u043e\u0432.<\/p>\n<h3><font color=\"#3AC1EF\">\u258dPrintf, printfn, \u043d\u0435\u0439\u043c\u0438\u043d\u0433<\/font><\/h3>\n<p>  \u042d\u0442\u043e \u043f\u043e\u043a\u043e\u0440\u043e\u0431\u0438\u043b\u043e \u043c\u0435\u043d\u044f \u0435\u0449\u0435 \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435, \u0444\u0443\u043d\u043a\u0446\u0438\u044f printf \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u043e\u043a\u0435, \u0430 printfn \u0432 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435. \u0412 \u044d\u0442\u043e\u043c \u0432\u0435\u0441\u044c F#.<\/p>\n<p>  \u041c\u0435\u043d\u044f, \u043a\u0430\u043a \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u0433\u043e \u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 \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 \u0438\u0437 Powershell \u044d\u0442\u043e \u043f\u043e\u043a\u043e\u0440\u043e\u0431\u0438\u043b\u043e, \u043f\u043e\u0441\u043b\u0435 Powershell\u2019a \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u044f\u0437\u044b\u043a \u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u0430\u043a\u0438\u043c-\u0442\u043e \u043a\u0443\u0446\u044b\u043c.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0431\u044b \u044f \u0434\u0435\u043b\u0430\u043b F#, \u044f \u0431\u044b \u0441\u0434\u0435\u043b\u0430\u043b \u043a\u0430\u043a\u0443\u044e-\u0442\u043e \u0442\u0430\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"plaintext\">Out-Host\u00a0\u00abInput\u00a0string\u00bb -Newline<\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0445\u043e\u0434 \u0431\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0432\u0435\u0440\u0448\u0435\u043b\u043b\u0430 \u043a \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c \u043b\u0443\u0447\u0448\u0438\u0439, \u0438\u0431\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0433\u043e\u043b\u043e\u0432\u0435 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432.<\/p>\n<h3><font color=\"#3AC1EF\">\u258dNapespaces \u0438 \u043b\u0435\u043d\u0438\u0432\u044b\u0439 Open<\/font><\/h3>\n<p>  \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u0441\u0432\u043e\u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0441\u0442\u044b\u043b\u044f \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u0439\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 ASP NET MVC. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u0438\u0437 MVC \u0442\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0421, \u043d\u043e \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u0438 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u044b\u0435.<\/p>\n<p>  \u0412 F# \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 F# \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0438\u0436\u0435.<\/p>\n<p>  \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b Open \u043c\u044b \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u0439\u043c\u0441\u043f\u0435\u0439\u0441\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u0438.\u00a0\u042d\u0442\u043e \u0430\u043d\u0430\u043b\u043e\u0433 Using \u0438 Import-Module. \u041f\u043e \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0438 \u0441 Powershell, \u044f \u043c\u043e\u0433\u0443 \u0438\u043c\u043f\u043e\u0440\u0442\u043d\u0443\u0442\u044c \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0435\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438, \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0451 \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0443 \u0444\u0430\u0439\u043b\u0430 \u0438 \u0432\u0441\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u044f\u043c \u043a\u0430\u043a \u0432 \u043f\u0430\u0432\u0435\u0440\u0448\u0435\u043b\u043b\u0435? \u041d\u0435\u0442.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432 F# \u0444\u0430\u0439\u043b, \u0435\u0433\u043e \u043c\u0430\u043b\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043e\u0434\u043d\u0430, \u043f\u0440\u0438\u0447\u0435\u043c \u043b\u044e\u0431\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0431\u044b\u043b\u0430 \u0432\u044b\u0437\u0432\u0430\u043d\u0430.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d||&gt;,\u00a0 &lt;|, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 | ?<\/font><\/h3>\n<p>  \u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 |&gt; \u043d\u0443\u0436\u0435\u043d \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p>  ||&gt; \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.<\/p>\n<p>  |||&gt; \u0430 \u044d\u0442\u043e\u0442 \u043c\u043e\u043d\u0441\u0442\u0440 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u043a\u043e\u0440\u0442\u0435\u0436 \u0438\u0437 \u0442\u0440\u0451\u0445 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e.\u00a0<\/p>\n<p>  \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u0440\u0442\u0435\u0436\u0430\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">(1,\u00a02)\u00a0||&gt;\u00a0someFunction<\/code><\/pre>\n<p>  \u0410 \u0441 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">1\u00a0|&gt;\u00a0someFunction<\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0435\u044f\u0441\u043d\u043e, \u0447\u0442\u043e \u043c\u0435\u0448\u0430\u0435\u0442 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0443 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u0447\u0435\u043c \u043e\u043d \u0438\u043c\u0435\u0435\u0442 \u0434\u0435\u043b\u043e, \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u043a \u043a\u043e\u0440\u0442\u0435\u0436\u0438 \u0438 \u0434\u0432\u0435 \u043f\u0430\u043b\u043a\u0438 \u0441\u043e \u0441\u0442\u0440\u0435\u043b\u043e\u0447\u043a\u043e\u0439 \u0440\u044f\u0434\u043e\u043c \u0441 \u043d\u0438\u043c\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>  \u042d\u0442\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0431\u044b\u043b\u0430 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u0438\u0437-\u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u0439 \u043e\u0448\u0438\u0431\u043a\u0438, &lt;| \u2014 Pipe back \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u041e\u043d \u0431\u044b\u043b \u0432\u0432\u0435\u0434\u0435\u043d, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0441\u043a\u043e\u0431\u043e\u0447\u0435\u043a. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443 \u044d\u0442\u043e:<\/p>\n<pre><code class=\"plaintext\">printfn\u00a0\u00ab%s\u00ab\u00a0(string\u00a0\u00abValue\u00bb)<\/code><\/pre>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"plaintext\">printfn\u00a0\u00ab%s\u00ab\u00a0&lt;|\u00a0string\u00a0\u00abValue\u00bb<\/code><\/pre>\n<p>  \u0414\u043e\u043d \u0421\u0430\u0439\u043c, \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u043e\u0440 \u044f\u0437\u044b\u043a\u0430 \u043a\u0430\u043a \u0440\u0430\u0437 \u0433\u043e\u0432\u043e\u0440\u0438\u043b \u043e\u0431 \u044d\u0442\u043e\u043c <a href=\"https:\/\/youtu.be\/1AZA1zoP-II?t=2129\">\u0442\u0443\u0442<\/a>.<\/p>\n<h2><font color=\"#3AC1EF\">\u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u044b \u043d\u0435 F#?<\/font><\/h2>\n<p>  \u041f\u043e\u043c\u043d\u0438\u0442\u0435 \u043e \u043b\u0435\u043a\u0446\u0438\u044f\u0445 \u043e\u0442 \u043a\u0440\u0443\u0442\u044b\u0445 \u043c\u0443\u0436\u0438\u043a\u043e\u0432? \u042f \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0430\u043b \u043b\u0435\u043a\u0446\u0438\u044e \u043e\u0442 \u0421\u043a\u043e\u0442\u0442\u0430 \u0412\u043b\u0430\u0448\u0438\u043d\u0430 <a href=\"https:\/\/www.youtube.com\/watch?v=2JB1_e5wZmU&amp;t=2106s\">\u0438 \u043d\u0430 \u044d\u0442\u043e\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u0435 \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0431\u0438\u043b\u043e<\/a>, \u044f \u043f\u043e\u043d\u044f\u043b \u044d\u0442\u0443 \u0433\u0438\u0433\u0430\u043d\u0442\u0441\u043a\u0443\u044e \u043c\u044b\u0441\u043b\u044c, \u043e\u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0435 \u043d\u0430\u043a\u0440\u044b\u043b\u043e \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u0440\u043e\u043d, \u044d\u0442\u043e \u0441\u043e\u0432\u0441\u0435\u043c \u0434\u0440\u0443\u0433\u0430\u044f \u043f\u0430\u0440\u0430\u0434\u0438\u0433\u043c\u0430. \u042f \u043c\u043e\u0433 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u0434\u0435\u0442\u044c \u043d\u0430 \u0441\u0442\u0443\u043b\u0435 \u0438 \u0443\u0445\u0430\u0442\u044c.<\/p>\n<h3><font color=\"#3AC1EF\">\u258dSome, None<\/font><\/h3>\n<p>  \u0421\u043a\u0430\u0436\u0435\u043c, \u043c\u044b \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0430 \u0434\u0432\u0443\u0445 \u044f\u0437\u044b\u043a\u0430\u0445. \u0412 F# \u0438 \u0421#. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c txt \u0444\u0430\u0439\u043b \u0438 \u0447\u0442\u043e-\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c. \u0415\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a, \u043a\u043e\u0434 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 C# \u0443\u043f\u0430\u0434\u0435\u0442 \u0441\u0440\u0430\u0437\u0443 \u0432 \u0434\u0432\u0443\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e StreamReader \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435\u0442, \u0434\u0430 \u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0435 \u0443\u043c\u0435\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0443\u043b\u0451\u043c.<\/p>\n<p>  \u0412\u0441\u044f \u0437\u0430\u0434\u0443\u043c\u043a\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c Value, \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u0447\u0442\u043e-\u0442\u043e, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0442\u0438\u043f, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c Value of None. \u0418 \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 Some of Value, \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 None.<\/p>\n<p>  \u041a\u0430\u043a \u043f\u0440\u0438\u043c\u0435\u0440, \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u043e\u0442\u043d\u0435\u0442\u043e\u0432\u0441\u043a\u0438\u043c\u0438 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438 \u0432 F#:<\/p>\n<pre><code class=\"plaintext\">  let dictionary = Dictionary&lt;string, string&gt; ()         let getFromDictionary key =         match dictionary.TryGetValue (key) with         | true, value -&gt; Some (value)         | false, _ -&gt; None<\/code><\/pre>\n<p>  \u041a\u0441\u0442\u0430\u0442\u0438, \u044d\u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0430 C# \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0435\u0441\u0442\u044c LanguageExt.Core \u0438 Maybe \u043c\u043e\u043d\u0430\u0434\u044b, \u043d\u043e \u043d\u0430 C# \u0432\u0441\u0435 \u044d\u0442\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0436\u0430\u0441\u043d\u043e.<\/p>\n<h3><font color=\"#3AC1EF\">\u258dDiscriminated union aka \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b<\/font><\/h3>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043d\u0430 C# \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0432 2 \u043c\u0435\u0441\u0442\u0430\u0445. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0438 \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0444\u043e\u0440\u043c\u0430\u0442\u0443, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0443\u043f\u0430\u043b streamreader.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0430\u0434\u0430\u043b \u043d\u0430\u0448 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u0444\u0430\u0439\u043b \u043d\u0435 \u043f\u0443\u0441\u0442\u043e\u0439 \u0438 \u0447\u0442\u043e \u043e\u043d \u0442\u043e\u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0430. \u042d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043b\u0435\u0433\u0438\u0442\u0438\u043c\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430 C#, \u043d\u043e \u043d\u0435 \u043d\u0430 F#.\u00a0<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440, \u0433\u0434\u0435 \u043d\u0430\u0448\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441 txt \u0438 ini \u0444\u0430\u0439\u043b\u0430\u043c\u0438.<\/p>\n<pre><code class=\"plaintext\">type ValidInput =     | Txt of string     | Ini of string   type InvalidInput =     | WrongFormat     | FileDoesNotExists     | FileIsEmpty     | OtherBadFile   type Input =     | ValidInput of ValidInput     | InvalidInput of InvalidInput <\/code><\/pre>\n<p>  \u041d\u0430 F# \u0437\u0430\u0449\u0438\u0442\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043c\u043e\u0449\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0442\u0438\u043f\u043e\u0432 \u0438 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u0430\u0442\u0447\u0438\u043d\u0433\u0443 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0445\u0435\u043d\u0434\u043b\u0438\u0442\u044c \u0432\u0441\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043d\u0435 \u0441\u043c\u0435\u0448\u0438\u0432\u0430\u044f \u0437\u0430\u0449\u0438\u0442\u043d\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0441 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439.<\/p>\n<pre><code class=\"plaintext\">let input = testInputObject request   match input with | ValidInput (x) -&gt; invokeAction x  | InvalidInput (x) -&gt; writeReject x  <\/code><\/pre>\n<p>  <\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u041d\u0435\u043f\u0440\u043e\u0431\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u0434\u0438\u0437\u0430\u0439\u043d \u044f\u0437\u044b\u043a\u0430<\/font><\/h3>\n<p>  \u041d\u0435\u043f\u0440\u043e\u0431\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043d\u0438 \u043d\u0443\u043b\u044f\u043c\u0438, \u043d\u0438 \u0431\u0430\u0433\u0430\u043c\u0438. \u0418 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432:<\/p>\n<ul>\n<li>\u041d\u0435\u0442 return. \u0412\u0435\u0440\u043d\u0443\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043a\u043e\u043d\u0446\u0435 \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0439 \u043b\u043e\u0433\u0438\u043a\u0438.<\/li>\n<li>\u041d\u0435\u0442 if \u0431\u0435\u0437 else. \u041f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e if \u0431\u0435\u0437 else \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043c, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d null.<\/li>\n<li>Type of Value. \u0412 F# \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0431\u043e \u0442\u0438\u043f, \u043b\u0438\u0431\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0442\u0438\u043f\u0430, \u043d\u043e \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u043d\u0435 Null.<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435\u0433\u043e 3 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u0436\u0435 \u044f \u043f\u043e\u043d\u044f\u043b. \u0412\u0441\u0435\u0433\u043e \u0442\u0440\u0438 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0431\u044b\u043b\u0438 \u043d\u0443\u0436\u043d\u044b, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0431\u0430\u0433\u0438 \u043d\u0430 \u0441\u0442\u0430\u0434\u0438\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438.<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0412\u0441\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0434 \u0433\u043b\u0430\u0437\u0430\u043c\u0438<\/font><\/h3>\n<p>  \u042d\u0442\u043e \u0432\u044b\u0442\u0435\u043a\u0430\u0435\u0442 \u0438\u0437 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u044f\u0437\u044b\u043a\u0430, \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b \u0432 F# \u0432\u0435\u0434\u0443\u0442 \u0441\u0435\u0431\u044f \u043a\u0430\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u044b. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u044b\u0448\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0438\u0436\u0435.<br \/>  \u00a0\u00a0<br \/>  \u0427\u0442\u043e \u0441 \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b, \u044d\u0442\u043e \u043d\u0435 \u0434\u0430\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u0432 \u0432\u043e\u043b\u044c\u043d\u043e\u0439 \u0441\u043f\u0430\u0433\u0435\u0442\u0442\u0438 \u043c\u0430\u043d\u0435\u0440\u0435, \u043d\u043e \u0441 \u0434\u0440\u0443\u0433\u043e\u0439, \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u044f\u0441\u043d\u043e, \u043a\u0443\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c. \u0415\u0441\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0438\u0436\u0435, \u0442\u043e \u043e\u043d\u0430 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0430 \u0432\u044b\u0448\u0435.<\/p>\n<p>  \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u044d\u0442\u043e \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0441\u044f \u043d\u0430 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0439 \u0441 ASP .NET. \u0412\u0441\u0435 \u0442\u0438\u043f\u044b \u0438 \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435\u0439 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u2013 \u0432\u0441\u0435 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u043b\u0438\u0441\u0442\u0435.\u00a0<\/p>\n<h3><font color=\"#3AC1EF\">\u258d\u0418\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/font><\/h3>\n<p>  \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0432\u0435\u0440\u0445\u0435\u0434 \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u0430 \u043c\u0443\u0441\u043e\u0440\u0430. \u041d\u043e \u043a\u0430\u043a \u0436\u0435 \u043f\u0440\u0438\u044f\u0442\u043d\u043e \u043e\u0442\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u043a\u043e\u0433\u0434\u0430 \u0437\u043d\u0430\u0435\u0448\u044c, \u0433\u0434\u0435 \u0438 \u043a\u0430\u043a\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c.<br \/>  \u0422\u044b \u0437\u043d\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0441\u0430\u043c \u0443\u043a\u0430\u0437\u0430\u043b \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f.\u00a0<\/p>\n<p>  \u0422\u0430\u043a \u0436\u0435 \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e \u0447\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 \u043a\u043e\u043b\u043b\u0435\u043a\u0446\u0438\u044f\u043c\u0438, \u0441\u0442\u0440\u0438\u043d\u0433\u0431\u0438\u043b\u0434\u0435\u0440\u0430\u043c\u0438 \u0438 \u0442.\u043f., \u0437\u0430\u0447\u0435\u043c \u043c\u043d\u0435 \u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u043d\u0438\u0445?<\/p>\n<h3><font color=\"#3AC1EF\">\u258dDDD<\/font><\/h3>\n<p>  Domain Driven Design \u0432 F# \u044d\u0442\u043e \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u043d\u0430\u0442\u0438\u0432\u043d\u0430\u044f \u0432\u0435\u0449\u044c \u0438 \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0447\u043d\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 F#, \u0442\u043e \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438 \u043d\u0435 \u0437\u0430\u043f\u043e\u0434\u043e\u0437\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u0438 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0442\u044c.<\/p>\n<p>  \u0421\u043a\u0430\u0436\u0435\u043c, \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043c \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u0445, \u0433\u0434\u0435 \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043a\u043e\u0448\u043a\u0438, \u0430 \u0434\u0440\u0443\u0433\u0430\u044f \u2013 \u043f\u043e\u043f\u0443\u0433\u0430\u0438 \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u0441 \u043a\u0435\u043c \u043c\u044b \u0438\u043c\u0435\u0435\u043c \u0434\u0435\u043b\u043e. \u0423 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u0435 \u0441 \u0435\u0433\u043e ID \u0438 \u0431\u0443\u043b\u0451\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 \u00abHaveWings\u00bb.<\/p>\n<p>  \u0422\u043e \u0432\u043e\u0442 \u044d\u0442\u043e \u043d\u0435 F# \u0438 \u043d\u0435 DDD:<\/p>\n<pre><code class=\"plaintext\">let getUserType key =     let user = getFromDatabase key     if user.HaveWings = true then &quot;Parrot&quot;     else &quot;Cat&quot;<\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u0430\u0442\u0447\u0438\u043d\u0433, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0435\u0433\u043e \u043d\u0435\u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c\u044b\u043c \u0438 \u043c\u044b \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0442\u0438\u043f\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a.<\/p>\n<p>  \u0410 \u044d\u0442\u043e \u0443\u0436\u0435 \u0438 F# \u0438 DDD:<\/p>\n<pre><code class=\"plaintext\">let getUserType key =     let user = getFromDatabase key     if user.HaveWings = true then &quot;Parrot&quot;     else &quot;Cat&quot; <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0438\u043b\u0438 \u0430\u043b\u0433\u0435\u0431\u0440\u0430\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u0438\u043f\u044b, \u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430, \u043f\u0440\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439, \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u043d\u0430\u043f\u043e\u043c\u043d\u0438\u0442 \u043d\u0430\u043c \u043e \u0432\u0441\u0435\u0445 \u043c\u0435\u0441\u0442\u0430\u0445, \u0433\u0434\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0445\u0435\u043d\u0434\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f.<\/p>\n<p>  \u041f\u043b\u044e\u0441 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043c\u0430\u0442\u0447\u0438\u043d\u0433, \u0447\u0442\u043e \u0432 \u0431\u0443\u0434\u0443\u0449\u0435\u043c, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 else if \u0438 \u0434\u043b\u0438\u043d\u043d\u044b\u0445 \u0441\u0432\u0438\u0442\u0447\u0435\u0439.<\/p>\n<p>  \u0412 \u0446\u0435\u043b\u043e\u043c, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430 F# \u0438 \u0431\u0435\u0437 DDD, \u043d\u043e \u0435\u0441\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u0434 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u043e\u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c, \u043f\u043e\u0442 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u0438 \u043d\u0435\u0442?\u00a0<\/p>\n<hr>\n<p>  \u0412\u0441\u0435 \u0442\u043e \u0432\u0440\u0435\u043c\u044f, \u0447\u0442\u043e \u044f \u043d\u0435 \u0437\u043d\u0430\u043b, \u0447\u0442\u043e \u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0430 \u0441\u043c\u0435\u0441\u0438 C# \u0438 Powershell \u0434\u0430\u0436\u0435 \u043d\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0432 F# \u0442\u043e, \u043a\u0430\u043a \u0442\u044b \u043f\u0438\u0448\u0435\u0448\u044c \u043a\u043e\u0434 \u0442\u0430\u043a \u0436\u0435 \u0432\u0430\u0436\u043d\u043e, \u043a\u0430\u043a \u0438 \u0441\u043e\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441.<\/p>\n<p>  \u042f \u043f\u043e\u043d\u044f\u043b \u0432 \u0447\u0435\u043c \u0441\u0443\u0442\u044c \u0438\u043c\u0443\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e \u0434\u0435\u0444\u043e\u043b\u0442\u0443, \u044f \u043f\u043e\u043d\u044f\u043b DDD, \u044f \u043f\u043e\u043d\u044f\u043b, \u0432 \u0447\u0435\u043c \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0437\u0430\u0434\u0443\u043c\u043a\u0430 \u044f\u0437\u044b\u043a\u0430.<\/p>\n<p>  \u0422\u0430\u043a \u044f \u043f\u043e\u043b\u044e\u0431\u0438\u043b F# \u0438 \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u043e\u043c\u0431\u0438\u0442.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043a\u0440\u044b\u0442\u044b\u0439 \u0442\u0435\u043a\u0441\u0442<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u041c\u043e\u043d\u0441\u0442\u0440-\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434 \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u0441\u0442\u0430\u0442\u044c\u044e \u0432 \u044e\u043c\u043e\u0440\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0446\u0435\u043b\u044f\u0445, \u043d\u043e \u044f \u0442\u0430\u043a\u0438 \u0435\u0433\u043e \u0434\u043e\u0434\u0435\u043b\u0430\u043b. \u0418 \u0432 \u043d\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 (\u0435\u0441\u043b\u0438 \u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435) \u043f\u0440\u043e\u0431\u043b\u0435\u043c, \u0447\u0435\u043c \u0432 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435, \u043d\u043e \u0442\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u0435\u0435.\u00a0<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0435\u0442\u0435, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0433\u043e \u0435\u0449\u0435 \u043b\u0443\u0447\u0448\u0435 \u2014 \u0441\u0432\u0438\u0441\u043d\u0438\u0442\u0435.<\/p>\n<pre><code class=\"plaintext\">let splitPath inputObject =      let mutable inputObject : string = inputObject     let stringArray = inputObject.Split(System.IO.Path.DirectorySeparatorChar)         let mutable outString = &quot;&quot;     for i in stringArray do         outString &lt;- i        let chararray = outString |&gt; Seq.toList |&gt; List.rev     for c in chararray do         inputObject &lt;- inputObject.TrimEnd(c)       printfn &quot;%s&quot; inputObject   splitPath @&quot;C:\\users\\test\\folder&quot;<\/code><\/pre>\n<\/div><\/div>\n<p>  <a href=\"http:\/\/ruvds.com\/ru-rub?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=machehin&amp;utm_content=f-language#order\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ou\/g5\/kh\/oug5kh6sjydt9llengsiebnp40w.png\"><\/a><\/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:\/\/habr.com\/ru\/company\/ruvds\/blog\/545740\/\"> https:\/\/habr.com\/ru\/company\/ruvds\/blog\/545740\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vv\/oe\/yk\/vvoeyksgewqqslge4ny49da8_3g.png\"><\/p>\n<p>  \u0410 \u0432\u044b \u043a\u043e\u0433\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0441\u0432\u043e\u0438 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0435\u043d\u0438\u044f \u043e\u0442 \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430? \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0432\u0441\u0435, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e\u0431\u044b \u0447\u0435\u0440\u0435\u0437 \u043f\u0430\u0440\u0443 \u043d\u0435\u0434\u0435\u043b\u044c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u0434\u0430\u043b\u044c\u043d\u043e\u0432\u0438\u0434\u043d\u044b\u043c\u0438 \u0438 \u0442\u0443\u043f\u044b\u043c\u0438 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438?\u00a0<\/p>\n<p>  <a href=\"https:\/\/habr.com\/ru\/company\/ruvds\/blog\/545740\/\">\u041a\u0410\u0420\u0422\u0418\u041d\u041a\u0410 \u0414\u041e \u041a\u0410\u0422\u0410<\/a><\/p>\n<p>  \u041d\u0430 \u0434\u043d\u044f\u0445 \u044f \u043f\u043e\u043d\u044f\u043b F#, \u0438 \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u043c\u044b\u0441\u043b\u044c, \u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0437\u0430 \u044f\u0437\u044b\u043a\u043e\u043c.\u00a0  <\/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-319140","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/319140","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=319140"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/319140\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=319140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=319140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=319140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}