views:

116

answers:

1

I have the following code in Lisp:

(defun Is_List_Even (lista)
  (cond 
    ((null lista) t)
    ((null (cadr lista)) nil)
    (t (Is_List_Even (cddr lista)))))

Can someone help me to write in F#? I'm new to F# and I'm in a hurry.

Regards, Voicu.

+5  A: 
let rec even = function
| [] -> true
| [_] -> false
| _::_::l -> even l
ygrek