DJB's redo in Haskell (Haskel learning)