From 37d6eab0cd0c02d6b65740c956e9436725a48b6d Mon Sep 17 00:00:00 2001 From: Dmitriy Gorshenin Date: Thu, 12 May 2022 19:10:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=81=D0=BB=D0=B5=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D1=8C=20=D0=B2=D1=8B=D1=87=D0=B8=D1=81=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B9=20=D0=B8=20=D0=A0=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=20=D1=81?= =?UTF-8?q?=20=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC=D0=BE=D0=B9=20=D1=82?= =?UTF-8?q?=D0=B8=D0=BF=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Латин Ярослав/1ch.fs | 33 +++++++++++++++++++++++++++++ Латин Ярослав/2ch.fs | 16 ++++++++++++++ Латин Ярослав/README.md | 16 ++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 Латин Ярослав/1ch.fs create mode 100644 Латин Ярослав/2ch.fs create mode 100644 Латин Ярослав/README.md diff --git a/Латин Ярослав/1ch.fs b/Латин Ярослав/1ch.fs new file mode 100644 index 0000000..743ae36 --- /dev/null +++ b/Латин Ярослав/1ch.fs @@ -0,0 +1,33 @@ +// For more information see https://aka.ms/fsharp-console-apps + + +let mutable y1 = 1 +let _ = y1 <- y1*2 in +let _ = y1 <- y1+1 in +let _ = y1 <- y1+1 in + +printf "y1 = %A\n"y1 + +let mutable x1 = 1 +let _ = x1 <- x1+1 in +let _ = x1 <- x1*2 in +let _ = x1 <- x1+1 in + +printf "x1 = %A\n"x1 + +let mutable y = 1 +y <- y * 2 +y <- y + 1 +y <- y + 1 + + +printf "y = %A\n"y + +let mutable x = 1 +x <- x + 1 +x <- x * 2 +x <- x + 1 + + +printf "x = %A\n"x + diff --git a/Латин Ярослав/2ch.fs b/Латин Ярослав/2ch.fs new file mode 100644 index 0000000..9898a1d --- /dev/null +++ b/Латин Ярослав/2ch.fs @@ -0,0 +1,16 @@ +// For more information see https://aka.ms/fsharp-console-apps +module kolok + +let mutable x = [] + +let mutable refx = ref x + +let _ = refx <- ref [2] +//let _ = refx <- ref [true] + + +printf "%O\n" refx +printf "%A\n" refx + + + diff --git a/Латин Ярослав/README.md b/Латин Ярослав/README.md new file mode 100644 index 0000000..5aa1982 --- /dev/null +++ b/Латин Ярослав/README.md @@ -0,0 +1,16 @@ +# Последовательность вычислений и Работа с системой типов +## Ссылка на видеоразбор + +## Код из книги +Ярик Латин, [5/10/22 4:31 PM] +let _ = x := !x + 1 in +let _ = x := !x + 1 in +let _ = x := !x + 1 in +let _ = x := !x + 1 in +();; + +Ярик Латин, [5/10/22 4:31 PM] +x := !x + 1; +x := !x + 1; +x := !x + 1; +x := !x + 1;; \ No newline at end of file