http://github.com/mojombo/erlang_pipe/tree/master/pipe.erl
The performance ends up being quite good.
http://en.wikipedia.org/wiki/Spaceship_operator
My background is in math so I always though of it in terms of the sign function: http://en.wikipedia.org/wiki/Sign_function
spaceship(x,y) = sign(x-y), for numbers, anyhow.
http://github.com/mojombo/erlang_pipe/tree/master/pipe.erl
The performance ends up being quite good.