Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This problem is supposed to be coded in Standard ML, I tried this fun exists (x, L) = if null L then false else if

image text in transcribed

This problem is supposed to be coded in Standard ML, I tried this

fun exists (x, L) = if null L then false else if x = hd(L) then true else exists(x, tl(L));

but I get this error 'stdIn:27.52 Warning: calling polyEqual'.

1. exists -15% This function should return true if the first argument is a member of the second argument and have type (''a''a list) ->bool. Explain in a comment why the typeis (''a''a list) ->bool and not ('a'a list) bool Note: this function is not required to be tail-recursive. Examples exists (1,1) false > exists (1,(1,2,31) true exists ((1],1]1) true > exists ((1), [[3),[5]]); false exists "c","b","c","z"]): true

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

DNA Databases

Authors: Stefan Kiesbye

1st Edition

0737758910, 978-0737758917

More Books

Students also viewed these Databases questions

Question

Detailed note on the contributions of F.W.Taylor

Answered: 1 week ago

Question

7. It is advisable to do favors for people whenever possible.

Answered: 1 week ago

Question

9. Power and politics can be destructive forces in organizations.

Answered: 1 week ago