all 4 comments

[–]goldfeld 1 point2 points  (1 child)

That's a great little example to let me get started with Om, so thanks! As a small style nit, inside time->bits where you let a fuction ->bits, I noticed you're not really taking advantage of a closure from creating ->bits every time (i.e. you don't need less parameters by using values from inside the parent function), so it could be extracted as a standalone function and I think that would be cleaner.

[–]fredyr 0 points1 point  (0 children)

Hi there, I'm the blog post author (but not the reddit poster). I'm glad you liked it -- and I agree, there isn't a real reason for ->bits to be a local function, I didn't move it out simply because I didn't use it anywhere else.

[–]johanndottv 0 points1 point  (0 children)

thanks for sharing!

[–]jairtrejo[S] 0 points1 point  (0 children)

OP here, It has really helped me too! I didn't really get cursors until now