Effective Haskell: ch2 combineLists (page 66)

On p66 of B9.0 chapter 2:

combineLists as bs = 
  let a = head as
      b = head bs
      as' = tail as
      bs' = tail bs
  in if null as || null bs
     then []
     else (a,b) : combineLists as' bs'

I find this let clause a bit of an eyesore given that head and tail are not safe.

How about moving the let clause into the else branch (or possibly a where)? Or is it better just to drop those local variables completely?

Thanks. It’s sometimes hard to figure out how to format these early examples. I think being verbosely explicit here helps people build an intuition up.