You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Main exposing (main)
import Html as H
main : H.Html Never
main =
H.text (String.repeat "Hello World! " 3)
Error
Type Mismatch
Line 7, Column 43
The 2nd argument to `repeat` is not what I expect:
7| H.text (String.repeat "Hello World! " 3)
^
This argument is a number of type:
number
But `repeat` needs the 2nd argument to be:
String
Hint: I always figure out the argument types from left to right. If an argument
is acceptable, I assume it is “correct” and move on. So the problem may actually
be in one of the previous arguments!
Hint: Try using String.fromInt to convert it to a string?
Type Mismatch
Line 7, Column 27
The 1st argument to `repeat` is not what I expect:
7| H.text (String.repeat "Hello World! " 3)
^^^^^^^^^^^^^^^
This argument is a string of type:
String
But `repeat` needs the 1st argument to be:
Int
Hint: Want to convert a String into an Int? Use the String.toInt function!
Suggestion
Type Mismatch
Line 7, Column 27 and 43
The argument order seems to be inverted at `repeat`:
7| H.text (String.repeat "Hello World! " 3)
^ ^
These argument are:
String and number
But `repeat` needs arguments to be:
number and String
The text was updated successfully, but these errors were encountered:
Example
Error
Suggestion
The text was updated successfully, but these errors were encountered: