Calculator using functional reactive programming techniques in JavaScript