even and odd
Posted: Fri Dec 08, 2006 10:50 pm
Hi Lutz,
How about two new functions?
'even, which determines the even numbers from a value or a list
'odd, which determines the uneven numbers from a value or list
like ->
(map odd '( 1 2 3 4 5 6 7 8 9))
>(true nil true nil true nil true nil true)
(even 14)
> true
(odd '(3 5 8))
>(3 5)
(clean odd '( 3 5 7 4 8 ))
>( 4 8 )
Norman.
How about two new functions?
'even, which determines the even numbers from a value or a list
'odd, which determines the uneven numbers from a value or list
like ->
(map odd '( 1 2 3 4 5 6 7 8 9))
>(true nil true nil true nil true nil true)
(even 14)
> true
(odd '(3 5 8))
>(3 5)
(clean odd '( 3 5 7 4 8 ))
>( 4 8 )
Norman.