100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CIS 505 Exam 1 Notes Study Guide |Complete Questions with 100% Correct Answers

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
16-05-2024
Written in
2023/2024

CIS 505 Exam 1 Notes Study Guide |Complete Questions with 100% Correct Answers How do signify a real in SML? 12.0, 3e~2, 3,14e12 How do you signify a character in SML? #"x", #"A", #n" How do you concatenate two strings in SML? Using the ^ operator i.e. "abra" ^ "cadabra" = "abracadabra" What operators can you not use on reals? =, <> Can < and > be used on strings? Yes, and it means lexicographically precedes. It returns a bool i.e. "a" < "b", "abc" < "acb" What are the 3 boolean operators? not, andalso, orelse SML has what two types of typing? Static and Strong How to cast as a real in SML? real(11) = 11.0 How to round down, round up, round generally, and truncate? floor(5.4) = 5 ceiling(5.4) = 6 round(5.5) = 6 trunc(~5.4) = ~5 How to go from character to int? Vice-versa? ord(#"0") = 48 chr(48) = #"0" What is a tuple? A fixed-size ordered collection of two or more values. Always same length, sometimes different types Ex: (1, "a", true) (4, (1,"a",true)) What is a list? A list is a list of all the same type. Always same type, sometimes different length What are the return types of these list operations? Empty List [] Head hd Tail tl Append @ cons :: 'a list 'a list→'a 'a list→'a list 'a list*'a list→'a list 'a*'a list→'a list What do explode and implode to? Explode takes a string and converts it into a list of characters Implode takes a list of characters and makes it a string Fill in the blanks: SML is a(n) __________________-based (________________) language with ___________, ____________ typing SML is an expression-based(functional) language with strong, static typing. Write a basic function that takes in a number and adds one fun inc(x) = x+1; What does tl return? All the elements of the list except the first one Write a function that uses the a function and a number as its parameters. It is supposed to add the number and one to the function fun do_fun(f,x) = f(x) + x + 1; val a = 2; val a = 2 : int

Show more Read less
Institution
CIS 505
Course
CIS 505









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CIS 505
Course
CIS 505

Document information

Uploaded on
May 16, 2024
Number of pages
5
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
EXCELLENTSCORES1 Walden University
View profile
Follow You need to be logged in order to follow users or courses
Sold
16
Member since
2 year
Number of followers
8
Documents
1968
Last sold
2 months ago
EXCELLENTSCORES

"Hi, I’m Austin, a Mediccal student with a passion for making learning easier. I’ve created high-quality study materials to help students like you save time and ace your exams. My notes are comprehensive, easy to follow, and packed with everything you need to succeed. Let’s conquer those grades together!" My store has plenty of materials in NURSING, ECONOMICS, MATHEMATICS, BIOLOGY, AND HISTORY MATERIALS BEST TUTORING, HOMEWORK HELP, EXAMS, TESTS, AND STUDY GUIDE MATERIALS WITH GUARANTEED A+ I am a dedicated medical practitioner with diverse knowledge in Nursing and Mathematics. I also have additional knowledge in mathematics-based courses (finance and economics).

Read more Read less
4.0

2 reviews

5
0
4
2
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions