Я следил за (старым?) tutorial и получил несоответствие типа. Изменена ли библиотека List с 0.14.1 до 0.15? elmpage.Elm Тип списка несоответствие
Код:
module Fibonacci where
import List exposing (..)
fibonacci : Int -> List Int
fibonacci n =
let fibonacci1 n acc =
if n <= 2
then acc
else fibonacci1 (n-1) ((head acc + (tail >> head) acc) :: acc)
in
fibonacci1 n [1,1] |> reverse
Несоответствие типа:
Type mismatch between the following types on line 11, column 40 to 69:
number
Maybe.Maybe a
It is related to the following expression:
(head acc) + ((tail >> head) acc)
Type mismatch between the following types on line 11, column 52 to 64:
Maybe.Maybe
List
It is related to the following expression:
tail >> head