The Essence of the Cat
as written by a programmer
/****************************************************************/
/* Definition for the Domestic Cat */
do while life
select
when randy then find_mate
when food_available
and room_in_tummy
and may_be_hungry_later then eat
when it_moves then
do while play-thing_alive
play
end
when weather_sunny
and me_not_over-cooked then lie_in_sun
when weather_wet then do
go_out
get_feet_muddy
get_fur_soaking_wet
come_in
if owner_sleeping then awake_owner
else walk_everywhere
end
when not action_defined then wash
otherwise sleep
end
end
/****************************************************************/