functional programming helpers. mostly for personal use right now.