Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun even(n) = if n = 0 then true else
- if n = 1 then false else even(n-2);
- fun append(x,y) = if null(x) then y else
- hd(x) :: append (tl(x),y);
- fun f(x) = if null(x) then [] else
- if even(hd(x)) then hd(x) :: f(tl(x))
- else hd(x) ::f(tl(x));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement