Do: Yet another helper function library (inspired by python)

polaris · · 537 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Yes yes i know there are many of those around, this one is not that special but allowed me to learn go and now found it to be very useful.</p> <p>All, Any, Filter, Map, MapParallel, Range, Reduce, Reverse, Round, Slice, Sum, Uniquify (silly name)</p> <p>For the code: <a href="https://github.com/seiflotfy/do" rel="nofollow">https://github.com/seiflotfy/do</a></p> <p>and the docs: <a href="https://godoc.org/github.com/seiflotfy/do" rel="nofollow">https://godoc.org/github.com/seiflotfy/do</a></p> <hr/>**评论:**<br/><br/>MrCoati: <pre><p>LGTM, but as a downside, reflection makes this really slow in comparision</p></pre>seiflotfy: <pre><p>Sadly can&#39;t find another way around it. I am hoping to look into a way to precompile or something</p></pre>michaelbironneau: <pre><p>Check out <a href="https://clipperhouse.github.io/gen/" rel="nofollow">https://clipperhouse.github.io/gen/</a> for a code generation approach. Your current approach is clearly tidier and IMO perfectly suitable when out-and-out speed isn&#39;t required or eg. the mapped function in your MapParallel is IO-bound. </p></pre>pierrrre: <pre><p><a href="https://www.reddit.com/r/golang/comments/3elvhs/map_reduce_and_filter_in_go/ctg9o9m" rel="nofollow">https://www.reddit.com/r/golang/comments/3elvhs/map_reduce_and_filter_in_go/ctg9o9m</a></p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

537 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传