function days_in_year { integer Y=$1 if is_leap_year $Y then echo 366 else echo 365 fi } # End Listing 4: