Task

Determine whether a given year is a leap year in the Gregorian calendar.



See also

 Leap year (wiki)


:isLeapYear? (y-f)
    dup #400 mod n:zero? [ drop #-1 #0 ] [ #1 ] choose 0; drop
    dup #100 mod n:zero? [ drop  #0 #0 ] [ #1 ] choose 0; drop
    #4 mod n:zero? ;