Added benchmark 3: - lines - imperative + functional

I think the third benchmark has better performance. Anyway the code is clearer now.