Question: Write an ML function cross which, given two lists, computes the list of their cross-products. Namely, given the inputs [1,2,3] and [4,5,6], it computes [(1,4),
Write an ML function cross which, given two lists, computes the list of their cross-products.
Namely, given the inputs [1,2,3] and [4,5,6], it computes [(1,4), (1,5), (1,6), (2,4), (2,5), (2,6), (3,4), (3,5), (3,6)].
fun cross a b = ...
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
