Rewriting UNIX cal(1)
- by dharmatech
Hello,
Today I was testing out SRFI 19 and wrote a simple version of the UNIX cal(1) command.
Here's a version in R6RS Scheme which runs in Ikarus and Ypsilon. A few example runs.
Schemers: How would you write it? Use your favorite implementation.
Ruby and Python: I'm guessing that y'all have elegant date and time libraries. I'm sure you can put the Schemers to shame. ;-) Let's see what ya got.
I'd also like to see Haskell and golfed versions.
Is there a Stack Overflow tag for re-implementations of UNIX commands? :-)
Ed