functional spark