packages feed

freesect-0.6: S14.hs

  {- # LANGUAGE FreeSections #-}  -- with GHC's -F you cannot...

  module S14(main) where

  import Char(ord)

  data D = D Int String

  main = printList $ zipWith _[ f (__,b) $ D __ d ]_ as cs
    where
       f :: (Char,Float) -> D -> String
       f (a,b) (D c d) = d ++ ( show ( b * fromIntegral (ord a + c) ) )
       as = take 20 ['a','b'..]
       cs = take 20 [1,3..]
       b = 1.7
       d = "pleasant"
       printList = putStrLn . unlines