[Haskell-cafe] Re: wanted: haskell one-liners (in the perl sense of one-liners)

Thomas Hartman tphyahoo at gmail.com
Tue Mar 20 08:30:46 EDT 2007

You contributed

#12:14 < Thunder> @pl \s -> drop (length s - n) s
#12:14 < lambdabot> drop =<< subtract n . length

But, on second thought, 1) I can't use this as a drop-in replacement
for the non points free (right term?) version, and 2) I don't really
understand it.

Still, I would be curious to see if there is a way to make this useful somehow.

2007/3/20, Lutz Donnerhacke <lutz at iks-jena.de>:
> In iks.lists.haskell, you wrote:
> > This takes a long file containing mostly numerical data, filters out
> > the numerical data, and sorts it numerically. (Not the same thing as
> > sorting alphabetically, which is what you get by default, or using the
> > unix sort utility). Maybe there's some flag to make unix sort util act
> > like this? Enh, who cares, now we have haskell. :)
> sort -g
> > Thanks to Thunder
> I was not that helpful.

More information about the Haskell-Cafe mailing list