Revised js-fun slightly based on internal conversation.