Question: Write a curried F# function cartesian xs ys that takes as input two lists xs and ys and returns a list of pairs that represents

 Write a curried F# function cartesian xs ys that takes as

Write a curried F# function cartesian xs ys that takes as input two lists xs and ys and returns a list of pairs that represents the Cartesian product of xs and ys. (The pairs in the Cartesian product may appear in any order.) For example, > cartesian [a:b:c] [1:2:3];: val it:(char * int) list = [(a, 1):(a, 2):(a, 3):(b, 1):(b, 2) (b, 3):(c, 1):(c, 2):(c, 3)]

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!