the |> operator

55 views
Skip to first unread message

Matthew Pocock

unread,
Feb 28, 2012, 12:39:33 PM2/28/12
to sca...@googlegroups.com
Hi,

I've been playing with the |> operator. It makes some code look much cleaner. However, I'm running into problems when it needs to infer the input/output types of the function. I keep getting type mismatch errors for the function. The errors seem to follow the pattern:

expected: SomeContainer[SomeType] => NotInferedB, actual: SomeContainer[Nothing] => TheActualReturnType

I've had this with my own container types and also with the standard scala collections. Is there extra plumbing that either I or the signature of |> should be supplying to make this sort of thing work out? I'm compiling with 2.9.1 and scalaz 7 snapshot, if that's relevant.

Thanks,

Matthew

--
Dr Matthew Pocock
Integrative Bioinformatics Group, School of Computing Science, Newcastle University
skype: matthew.pocock
tel: (0191) 2566550

Reply all
Reply to author
Forward
0 new messages