to IsEven(x)
if x mod 2 = 0 then
return true
end if
return false
end IsEven
to ForEach(fn, l)
global ForEach_fn_
repeat with x in l
set ForEach_fn_ to fn
display dialog x
display dialog ForEach_fn_(x)
end repeat
end ForEach
set myList to {20, 10, 5, -3, 100, 15, 6}
ForEach(my IsEven, myList)