- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
Del1 = fun(K,[A|B],F,Acc) ->
if
not(is_list(A)) and (B==[]) and (A rem K == 0) -> Acc;
not(is_list(A)) and (B==[]) -> [A|Acc];
not(is_list(A)) and is_list(B) and (A rem K == 0) -> F(K,B,F,Acc);
not(is_list(A)) and is_list(B) -> F(K,B,F,[A|Acc])
end
end.
D=[10,22,34,45,52,60,75].
Del1(5,D,Del1,[]).
Follow us!