fork download
  1. type Seg = (Int, Int)
  2. type Pos = (Int, Int)
  3.  
  4. f::Bool->Seg->Int
  5. f a (c,d) = if a then c else d
  6.  
  7. f1::Pos->Int
  8. f1 p = f True p
  9.  
  10. main = print $ f1 (4,5)
Success #stdin #stdout 0.01s 3580KB
stdin
Standard input is empty
stdout
4