[Haskell-cafe] Having trouble with zip12..

Don Stewart dons at galois.com
Sun Jul 6 14:13:08 EDT 2008


mfeathers:
> 
> 
> 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
> 
> The domain is air traffic control and I need to generate 12-tuples for 
> aircraft that are within a particular radius of the tower.

12 tuples are really really unusual. It sounds like perhaps you should
be using a custom data type here.

    data Aircraft = Aircraft
            { wayPoints    = currentWayPoints
            , groundSpeeds = ...
            , headings     = ...
            , .... etc ...
            }




More information about the Haskell-Cafe mailing list