22 Nov
2005
22 Nov
'05
7:17 a.m.
I offer a simpler, more direct, and pre-existing correspondence between a functional programming construct and unix pipes: http://www.vex.net/~trebla/weblog/pointfree.html "Scherrer, Chad" <Chad.Scherrer@pnl.gov> writes:
I'm still trying to settle on a "feel" for good programming style in Haskell. One thing I've been making some use of lately is
(\|) = flip ($) infixl 0 \|
Then expressions like
f4 $ f3 $ f2 $ f1 $ x
become
x \| f1 \| f2 \| f3 \| f4
I've seen something like this on haWiki using (#), but I prefer this notation because it looks like a Unix pipe, which is exactly how it's used.
[...]