haskell

Haskell (/ˈhæskəl/) is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing.

Haskell is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the primary control construct is the function.

data parse in haskell by cvb

45ae4438d56d8492f842d2d395ca8abe?size=52

about a month ago I had to parse some data and serialize it back filtering wrong entries

data looks like csv 123;asd;... etc, with known field types, but it can be broken

I asked my teammates for help and got this solutions show me

Infinite lists in haskell by cvb

45ae4438d56d8492f842d2d395ca8abe?size=52

They are quite nice, you can just use them.

toH n = hs !! (n-1)
  where hs = [H.h1, H.h2, H.h3, H.h4, H.h5] ++ cycle [H.h6]

Actually you don't have many choices, template haskell is kind of overkill for such simple case.

#haskell #lazyeval