[erlang-questions] Weird lists:dropwhile/2 behavior?
fxmy wang
fxmywc@REDACTED
Sun Feb 21 13:39:27 CET 2016
Hello guys,
Just encountered this:
Erlang/OTP 18 [erts-7.0.3] [source-5991161] [64-bit] [smp:8:8]
[async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.0.3 (abort with ^G)1> F = fun(_) -> true
end.#Fun<erl_eval.6.54118792>2> K = fun(Elem) -> Elem > 3
end.#Fun<erl_eval.6.54118792>3> lists:dropwhile(F, [1,2,3,4,5]).
[]4> lists:dropwhile(K, [1,2,3,4,5]).
[1,2,3,4,5]
Is this behavior expected?
Am I missing something?
Cheers,
Fxmy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160221/996d5481/attachment.htm>
More information about the erlang-questions
mailing list