0
나는 elm (0.18)에서리스트의리스트를 제거하려고 시도하고있다. 이 함수를 호출elm에있는리스트의리스트를 제거하는 중
twoColumns
[ [ Widget1, Widget2 ]
, [ Widget3, Widget4 ]
]
이 : 다음은 함수 호출이다
이twoColumns : List List Widget -> Html Msg
twoColumns listoflists =
case listoflists of
listLeft :: listRight :: _ ->
div []
[ div [ class "col-md-6" ] (parsingOperation listLeft)
, div [ class "col-md-6" ] (parsingOperation listRight)
]
_ ->
div [] [ text "Error" ]
(.의는 parseOptions 인수로 List Widget
을 수용하는 것을 가정 해 봅시다)이 간단 destructuring처럼 보인다
,하지만 난 이 오류가 발생합니다 :
Tag `::` is causing problems in this pattern match.
71| listLeft :: listRight :: _ ->
^^^^^^^^^^^^^^^^^^^^^^^^^^
The pattern matches things of type:
List a
But the values it will actually be trying to match are:
List List Widget
모든 ID eas?
참고(listLeft::listRight::_)
패턴을 사용하려고하면 elm 형식이 패턴을 위 패턴으로 되돌립니다.