@@ -15,6 +15,42 @@ The rules of `raindrops` are that if a given number:
1515- 30 has both 3 and 5 as factors, but not 7, so the result would be "PlingPlang".
1616- 34 is not factored by 3, 5, or 7, so the result would be "34".
1717
18+ ## Hints
19+
20+ You need to implement the ` convert ` function that returns number converted to
21+ raindrop sound. You can use the provided signature if you are unsure
22+ about the types, but don't let it restrict your creativity:
23+
24+ ``` haskell
25+ convert :: Int -> String
26+ ```
27+
28+ This exercise works with textual data . For historical reasons, Haskell's
29+ `String ` type is synonymous with `[Char ]`, a list of characters. For more
30+ efficient handling of textual data , the `Text ` type can be used.
31+
32+ As an optional extension to this exercise, you can
33+
34+ - Read about [string types](https:// haskell- lang. org/ tutorial/ string- types) in Haskell .
35+ - Add `- text` to your list of dependencies in package. yaml.
36+ - Import `Data. Text ` in [the following way](https:// hackernoon. com/ 4 - steps- to- a- better- imports- list- in - haskell- 43 a3d868273c):
37+
38+ ```haskell
39+ import qualified Data.Text as T
40+ import Data.Text (Text )
41+ ```
42+
43+ - You can now write e. g. `convert :: Int -> Text ` and refer to `Data. Text ` combinators as e . g . `T.pack `.
44+ - Look up the documentation for [`Data. Text `](https:// hackage. haskell. org/ package/ text- 1.2 . 3.1 / docs/ Data - Text. html),
45+ - You can then replace all occurrences of `String ` with `Text ` in Raindrops. hs:
46+
47+ ```haskell
48+ convert :: Int -> Text
49+ ```
50+
51+ This part is entirely optional.
52+
53+
1854
1955## Getting Started
2056
0 commit comments