Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell rocks

Name: Anonymous 2007-03-24 16:50 ID:xVqPIWca

In this thread we praise the awesome Haskell and extol on its glorious features

for instance, say you have an arbitrarily complex data type, if you add
          deriving (Show, Read, Eq)
to the definition

Haskell will automatically figure out how to 1) convert it into a string 2) parse a string into data 3) compare for equality

How fucking awesome is that! Automatic hassle-free serialisation!

No more fucking around with how to parse a matrix! read m :: Matrix yay!

Name: Anonymous 2007-03-26 17:14 ID:T4RtC8U9


forward k0 λ0 e0 a b f φ λ = (x, y)
    where a1 = (a / (1+n)) * (1 + (n^2/4) + (n^4/64))
          e = sqrt $ 2*f - f^2
          hs = [h1', h2', h3', h4']
          n = (a-b) / (a+b)
          q = q' - e * q''
              where q' = asinh $ tan φ
                    q'' = atanh $ e * sin φ
          β = atan $ sinh q
          η' = atanh $ (cos β) * (sin $ λ - λ0)
          ξ' = asin $ (sin β) / (sech η')

          η = η' + (sum $ zipWith ηn hs [2, 4..])
              where ηn h c = (h $ n) * (cos $ c*ξ') * (sinh $ c*η')

          ξ = ξ' + (sum $ zipWith ξn hs [2, 4..])
              where ξn h c = (h $ n) * (sin $ c*ξ') * (cosh $ c*η')

          x = a1 * η * k0 + e0
          y = a1 * ξ * k0


Discuss.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List