[Haskell-cafe] flip1 through flip9, useful?

Jason Dagit dagitj at gmail.com
Wed Jan 15 00:23:18 UTC 2014


While I don't think the overall idea is good*, I do wonder if the explicit
numbers in the names could be removed.

Here are some approaches to writing N-ary zipWith that might give you
inspiration:
https://gist.github.com/dagit/6082516
https://gist.github.com/dagit/8428444

Both have links to the original sources. The first one depends on closed
type families and the other one still uses numerals but they are just names
for special functions that makes it all hold together.

* I don't think we should encourage use of things like flip8 in 'real code'
because it's very likely to make the code completely incomprehensible. I DO
think it's a fun and interesting exercise to generalizing flip to N-ary.

Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140114/2238c5b9/attachment.html>


More information about the Haskell-Cafe mailing list