Gen functions

Can you give this a once over, i remember the last time I made some pretty silly mistakes.
Just a thought. I wonder how much of a pain it would be for the user if we just made this into a non empty list. I might put together a simple `purescript-nonempty` anyway because it seems like it would be useful for a bunch of things like this.