Let
This presentation is the property of its rightful owner.
Sponsored Links
1 / 10

Let val x = 3 val y = x val z = 3 val u = ref x val v = ref 3 . . PowerPoint PPT Presentation


  • 47 Views
  • Uploaded on
  • Presentation posted in: General

Let val x = 3 val y = x val z = 3 val u = ref x val v = ref 3. Top. x. 3. y. z. 3. u. v. 3. Let val x = 3 val y = x val z = 3 val u = ref x val v = ref 3 val _ = u := 42. Top. x. 3. y. z. 3. u. 42. v. 3. Let val x = 3 val y = x

Download Presentation

Let val x = 3 val y = x val z = 3 val u = ref x val v = ref 3 . .

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Let val x 3 val y x val z 3 val u ref x val v ref 3

Let

val x = 3

val y = x

val z = 3

val u = ref x

val v = ref 3

.

.

.

Top

x

3

y

z

3

u

v

3


Let val x 3 val y x val z 3 val u ref x val v ref 3

Let

val x = 3

val y = x

val z = 3

val u = ref x

val v = ref 3

val _ = u := 42

Top

x

3

y

z

3

u

42

v

3


Let val x 3 val y x val z 3 val u ref x val v ref 3

Let

val x = 3

val y = x

val z = 3

val u = ref x

val v = ref 3

val _ = u := 42

val _ = v := !u

Top

x

3

y

z

3

u

42

v


Let val x 3 val y x val z 3 val u ref x val v ref 3

val a = (1, 2)

val b = (a, a)

val c = (42, ref b, a)

1

Top

2

a

b

c

42


Let val x 3 val y x val z 3 val u ref x val v ref 3

val a = (1, 2)

val b = (a, #2(a))

val c = (42, ref b, a)

1

1

Top

2

a

b

c

42


Let val x 3 val y x val z 3 val u ref x val v ref 3

val a = (1, 2)

val b = (a, #2(a)+5)

val c = (42, ref b, a)

1

1

Top

2

a

7

b

c

42


Let val x 3 val y x val z 3 val u ref x val v ref 3

val a = 2

val b = (a, a+5)

Top

a

2

7

b


Let val x 3 val y x val z 3 val u ref x val v ref 3

Top

Let

val s = BAR

val t = BAZ 312

val u = QUX (42, ref 211, ref s)

val v = nil

val w = BAR :: s :: nil

s

BAR

t

3

BAZ

u

QUX

u

42

211

w

::

::

BAR

nil


Let val x 3 val y x val z 3 val u ref x val v ref 3

Val arr = Array.fromList([3, fn(x) => x+1])

Top

arr

p: x

p: x+1

3


Let val x 3 val y x val z 3 val u ref x val v ref 3

Val x = [ref 1, ref 2, ref 3]

Val a = hd x

Val b = tl x

Top

x

::

::

::

nil

1

2

3

a

b


  • Login