We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
zip (repeat g)
map (g,)
1 parent 27ddf01 commit 34397bbCopy full SHA for 34397bb
exercises/practice/grade-school/test/Tests.hs
@@ -1,4 +1,5 @@
1
{-# OPTIONS_GHC -fno-warn-type-defaults #-}
2
+{-# LANGUAGE TupleSections #-}
3
4
import Test.Hspec (Spec, it, shouldBe)
5
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
@@ -12,7 +13,7 @@ specs :: Spec
12
13
specs = do
14
15
let fromList = foldr (uncurry add) empty
- let fromGrade g = fromList . zip (repeat g)
16
+ let fromGrade g = fromList . map (g,)
17
18
it "add student" $
19
sorted (add 2 "Aimee" empty) `shouldBe` [(2, ["Aimee"])]
0 commit comments