Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Eric Codes (they/them)
Eric Codes (they/them)
@eric@social.ericcodes.io  ·  activity timestamp last week

I just gave up and started using a #golang library that has generic FP style array processing functions. OMG, I forgot how lovely it is to use well designed higher-ordered functions.

Thinking in terms of sequences and transformations is so much nicer than the tedium of imperitive programming.

https://github.com/life4/genesis

I wish it supported the iter package though

GitHub

GitHub - life4/genesis: All generic functions for Go you ever need!

All generic functions for Go you ever need! Contribute to life4/genesis development by creating an account on GitHub.
  • Copy link
  • Flag this post
  • Block
gram
gram
@orsinium@fosstodon.org replied  ·  activity timestamp last week

@eric

i'm glad you like it 😊

the chans package is what i've made to do what now iterators do. there is some overhead but that was the only way at the time to have lazy iteration with support for "for" loops.

i've started to add iterators shortly before they got added to the language. my interface was a bit simpler, without "yield". would be nice to pick up that PR and rewrite to the new iterators API but i don't think i'll ever have time for it. maybe when i get old and rich.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct