Question: SML as Functional Programming Language in Discrete Mathematics Objectives of the assignment: To use SML language to create different data types and list of characters

SML as Functional Programming Language in Discrete Mathematics Objectives of the assignment: To use SML language to create different data types and list of characters as string as well as to be familiar with SML basic build-in functions. Guidelines and Requirement to complete the assignment For this assignment, use SML as functional programming language. The idea is to use SML to create some new data types, started with a new data type called candy which have values of Chocolate, Carmel, Taffy, Gum, and Toffee. Next, get creative and add some other datatypes of your choice (may you want add types called Fruits, or data type called Vegetables). Once you comfortable with data type them, try one of the special functions a available within SML. SML provides a special function to work with sequence of characters or strings. You start with a function called "Explode", which take string as parameter and create a sequence of characters in a list. In SML, you type the word "Explode", parenthesis, double quotes, and your first name, double quotes, close parenthesis. After that, go ahead and append your last name. To append your last name, or to concatenate it, use the @ sign and put in a list each letter of your last name. Once that's done, use the implode command to create a string with your full name.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!