How do you write the function 'pairs' in Haskell?

前端 未结 4 606
萌比男神i
萌比男神i 2021-02-07 04:50

The pairs function needs to do something like this:

pairs [1, 2, 3, 4] -> [(1, 2), (2, 3), (3, 4)]
4条回答
提交回复
热议问题