Hi Alec, I think after your code is cleaned up a little bit it would make a good addition to the extra/ library. Here are a few suggestions:
- You have a comment with an infix formula prior to the definition of 'bits-to-satisfy-error-rate'. If you'd rather use infix syntax here, just use the infix vocabulary. - In find-bloom-filter-sizes, find a way to only construct the range once. The compiler folds it anyway, but I think the code will read better without the repetition. - smallest-first can be written as '[ [ first ] bi@ > ] most' - In size-bloom-filter, you can write [ second ] [ first ] bi as 'first2 swap'. Or better yet, find a way to restructure the surrounding code so that it doesn't need the 'swap'. - increment-n-objects can use change-current-n-objects instead of current-n-objects>> .. >>current-n-objects. - relevant-indices can avoid calling swapd by putting a swap in the dip instead. Or maybe you can use 2dip, and change the parameter order to enhanced-double-hashes instead. - In bloom-filter-member?, you can replace 'map [ t = ] all?' with 'all?'. For future reference, '[ nth ] curry map' is named 'nths' in the sequences vocab. Also you might want to give the "fry" syntax a shot. Instead of [ foo ] 3curry you'd write '[ _ _ _ foo ] Slava ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Factor-talk mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/factor-talk
