Value creation: custom functions and type-juggling