Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create your programs using Visual Studio scripting, and submitting the F# scripting program .fsx; All of your F# code should be purely functional. You should

Create your programs using Visual Studio scripting, and submitting the F# scripting program .fsx;

All of your F# code should be purely functional. You should not make any use of mutable variables, loops, etc.;

Do not use built-in F# functions other than the ones discussed in class;

Pay attention to the types that F# infers for your functions! They are very informative;

Put comments in your code as appropriate;

You may define auxiliary functions to help in solving some of the problems, but you should try to use them only when necessary.

a) Write a curried F# function find x y that checks whether x is in list y, which returns true when x is in y and false otherwise: > find 2 [1;2;3];; val it : bool = true

b) Write an F# program removedup x that removes duplicated elements in list x (hint: use find function). For example, > removedup [1;2;1;3;2;4;4;5;7;6;7;5];; val it : int list = [1; 3; 2; 4; 6; 7; 5]

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

Step: 3

blur-text-image

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

Database Design And Relational Theory Normal Forms And All That Jazz

Authors: Chris Date

1st Edition

1449328016, 978-1449328016

Students also viewed these Databases questions

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago