Question: Use OCaml to write a program that returns one of four string values for each street number: N / A when the street

Use OCaml to write a program that returns one of four string values for each street
number:
"N/A" when the street doesn't exist. We only consider 1st
through 69th Streets.
"N" when the street goes north.
"S" when the street goes south.
"NS" when the street is two-way.
Hints:
You may find the infix 'mod' (modulo) function useful: for example,
'x mod 2' evaluates to 0 if x is even and 1 otherwise.
Sometimes there is no simple/clever way of writing down a
complex case analysis: you just have to write out all the cases.
 Use OCaml to write a program that returns one of four

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 Databases Questions!