Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
brehaut
· 15y ago · 0 comments
You can replace (\x -> (length x, head x)) with (length &&& head) if you import Control.Arrow to make it fully point free
Comments
[–]
jamwt
15y ago
Good idea re: Arrows, and we can go all out as long as we're using them. :-)
rle = group >>> map (length &&& head)
[–]
eru
15y ago
And stream fusion should get rid of intermediate data structures.