[Haskell-cafe] Defining new operators

Dan Weston westondan at imageworks.com
Fri Aug 10 16:56:17 EDT 2007


Prelude> let (.) = flip ($) in 5 . odd
True

But please don't, the (.) operator is a sacred artifact in my religion, 
and I'd hate to see it desecrated... :(

Dan

rodrigo.bonifacio wrote:
> Hi all,
> 
> Given the follwing function:
> 
>> owner :: Step -> Scenario
>> owner (Step id scenario action state response) = scenario
> 
> Is it possible to define the owner function in such way that I can write x.owner (returning the scenario related with the Step x)?
> 
> Thanks in advance,
> 
> Rodrigo.
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
> 




More information about the Haskell-Cafe mailing list