Question: do this in Haskell 9 10 - Create the removeNonuppercase function with proper type -> 11 12 removeNonUppercase xs = filter (flip elem 'A'.. 'Z'])

do this in Haskell do this in Haskell 9 10 - Create the removeNonuppercase function with

9 10 - Create the removeNonuppercase function with proper type -> 11 12 removeNonUppercase xs = filter (flip elem 'A'.. 'Z']) xs 13 4. Create the addThree function with proper type info) 15 16 addThree x y z = + y + z 17 18 spec :: Spec 19 spec do 20 describe "Functions have types" $ 1 it "can use a function with type" s do 22 removeNonuppercase "HelloWORLD" "shouldBe "HWORLD" 3 addThree 1 2 3 'shouldBe 6 4 describe "Type classes" s do 5 It can order strings" $ do 26 "Abrakadabra" - "Zebra" "shouldBe False 7 compare 3 5 shouldBe LT 28 7 shouldBe True 3 compare 5 shouldBe LT 10 It "can show anything" s do 31 show 3 shouldBe "3" 32 show True 'shouldbe" "True" 53 It can read strings into values" $ do read "True" Il False 'shouldBe True 35 read "8.2" + 3.8 'shouldBe' 12 36 (read "[1,2,3,4]" : [Int]) shoulde [1,2,3,4) 37 (read "(3:: (int, Char)) shoulde (3) BB it can provide ranges, next Itens for Enum types" $ do 39 ['a'..'e'l 'shouldBe "abcde" 10 [LT GT] 'shouldBe (LT, EQ, GT] 41 [3..5] shoulder [3,4,5) 42 succB! shouldBe' 'C' 43 describe "Nun is a nuneric typeclass" $ do 44 It can act like numbers" S do 45 (20 :: Int) shoulde 20 46 describe "fronintegral is there historical reasons S do 47 tt "can add Int and Floating point numbers s do from Integral (length [1,2,3,4) + 3 shouldee' 7.2 48 Haskell Tab Width Lnu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!