为什么 lists:all 不适用于 erlang 中的 pangram

Why doesn't lists:all work for pangram in erlang

有人可以向我解释为什么下面这段代码可以解决 Erlang 中的 pangram 问题吗?

139> Sentence.
"abcdefghijklmnopqrstuvwxyz"
140> lists:all(lists:seq($a, $z), fun(X) -> lists:member(X, Sentence) end).
** exception error: no function clause matching lists:all("abcdefghijklmnopqrstuvwxyz",#Fun<erl_eval.6.99386804>) (lists.erl, line 1212)

你弄错了参数的顺序。 Erlang 中大多数需要函数和术语的函数首先需要函数参数。

1> Sentence = "abcdefghijklmnopqrstuvwxyz".
"abcdefghijklmnopqrstuvwxyz"
2> lists:all(fun(X) -> lists:member(X, Sentence) end, lists:seq($a, $z)).
true