请告诉我第53行代码有什么问题?据我所知,它应该返回{[{12456},{77777},{99999},{88888}],[]}。为什么不匹配?如何修复?谢谢!
fu() ->
Tr = [{12456},{77777}, {99999}, {88888}],
car:foa1(Tr, {[],[]}).
foa1([], Acc) -> Acc;
foa1([{Tr}|Ot], {A1,A2}) ->
Direction = unknown,
A = fun(T, {Acc1, Acc2}) ->
case Direction of
unknown -> {[T | Acc1], Acc2};
_ -> {Acc1, [T | Acc2]}
end
end,
{Acc1, Acc2} = lists:foldl(A, {[],[]}, Tr),
foa1 (Ot, {A1 ++Acc1, A2 ++ Acc2}).
**异常错误:函数<car.0.18093156>car:foa 1/2(car.erl,第53行)中没有与list:foldl(#Fun,{[],[]},12456)(lists.erl,第1262行)匹配的函数子句
1条答案
按热度按时间efzxgjgh1#
问题解决了!我已经纠正了发送到工作中的列表的格式。感谢所有