给出两个列表,[a, b]并且[c, d],我想得到以下结果:
[a, b]
[c, d]
[(a,c), (a,d), (b,c), (b,d)]
我怎么能在Haskell中做到这一点?是否有内置功能,或者我应该自己实现?
combinations haskell tuples list
combinations ×1
haskell ×1
list ×1
tuples ×1