[Haskell-cafe] Function application like a Unix pipe
Albert Lai
trebla at vex.net
Mon Nov 21 18:17:12 EST 2005
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 at 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.
[...]
More information about the Haskell-Cafe
mailing list