"John Ky" writes:
> Hi,
>
> Possibly a silly question but is it possible to have a function that has a
> different return type based on it's first argument?
Are you sure that's what you really want?
> For instance
>
> data Person = Person { name :: String, ... }
> data Business = Business { bus
John Ky wrote in article
in
gmane.comp.lang.haskell.cafe:
> data Person = Person { name :: String, ... }
> data Business = Business { business_number :: Int, ...}
>
> key person = name person
> key business = business_number business
Let's make this concrete:
data Person = Person { name ::