【发布时间】:2011-11-03 22:17:36
【问题描述】:
我正在定义一个 TestList (HUnit),并希望将定义分布在多行中。我得出以下解决方案:
tests = TestList ([TestLabel "test1" test1] ++
[TestLabel "test2" test2] ++
[TestLabel "test3" test3] ++
[TestLabel "test4" test4] ++
[TestLabel "test5" test5])
- 使用
++运算符是否是执行此类操作的正确方法? - 有没有更好或更优雅的方法来做到这一点?
【问题讨论】:
标签: haskell