putTerm (TupleTerm value)
  | len < 256 = tag 104 >> put8u len  >> forM_ value putTerm
  | otherwise = tag 105 >> put32u len >> forM_ value putTerm
  where
    len = length value
putTerm (TupleTerm value)
  | len < 256 = tag 104 >> put8u len  >> forM_ value putTerm
  | otherwise = tag 105 >> put32u len >> forM_ value putTerm
  where
    len = length value
putTerm (TupleTerm value)
  | len < 256 = tag 104 >> put8u len  >> forM_ value putTerm
  | otherwise = tag 105 >> put32u len >> forM_ value putTerm
  where
    len = length value