[Haskell-cafe] Having trouble with zip12..
Tony Morris
tmorris at tmorris.net
Sun Jul 6 16:47:07 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Feathers wrote:
>
>
> I have some code that looks like this and I'm having trouble with
> it:
>
>
> zip12 ((tails . nub) flightPaths) wayPoints etopsPackets (hd
> geoCaches) groundSpeeds headings (map windShift headings)
> (regulations !! 2) (foldr (\|/) (tail pathDistances)) [ghy x | x <-
> [1..], full x] (nub . nub) arrivalSchedule
Hi Michael,
Sorry to distract from your issue, but I note that (nub . nub) can be
replaced with just 'nub' since the function nub is idempotent (f . f
== f).
<dibblego> @check \x -> (nub . nub) x == nub x -- is nub idempotent?
<lambdabot> OK, passed 500 tests.
- --
Tony Morris
http://tmorris.net/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIcS9LmnpgrYe6r60RAiDOAKCJlDaqNd5ssgxrUrrHee75WGzhbgCfftdn
70+4isXh4zaoYly0da2Gdk8=
=ryfF
-----END PGP SIGNATURE-----
More information about the Haskell-Cafe
mailing list