Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Indicate ALL syntax errors of each SML statement and try to correct. Eg . 3 , 1 = 2 answer 1 = > type mismatch

Indicate ALL syntax errors of each SML
statement and try to correct.
Eg.3,1=2
answer 1=> type mismatch for a list, 3
has to be boolean.
answer 2=> type mismatch for a list, 1=2
has to be int such as 1+2.
answer 3=> different type of values, can
not be list, tuple instead (3,1=2)
(1) valx= if (hd (false)) then tI ([1,2.0]);
(2) val L=[hdtl?tlhdhd];
(3) val x=(string, real, [hd 1,2, tl ([3,4]];
(4) val x= if hd 2==1 then tl[2+1] else
nil;
(5) val x=(hd tl [1,2], ord (tl
(explode("ab")),-3.0);
(6) val hd (tl (tl [4]));
(7) val x=1 div if true then 2.0 else 3;
(8) tl (hd [floor(2.3)/ ceil(1,2)]);
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Databases Concepts And Practice

Authors: Suzanne W Dietrich

1st Edition

1119827949, 9781119827948

More Books

Students also viewed these Databases questions