Description

In Lisp and its variants, function calls are done using parenthesis where the first item in the parenthesis is the function being called and the following items are arguments to the function. Given a mathematical ( + - * / ) expression using this notation, return the result. Note: In Lisp, functions that normally take only two arguments can be called with many arguments, with the function being applied to all elements from left to right.

Simple example

(+ 1 1 1 1 1)

would give 5.

Complicated example

(* (* 10 (+ 1 4)) (+ 10 (/ 12 2 3) 1) 0.1)

would give 65.

Solution Stats

327 Solutions

89 Solvers

Last Solution submitted on Feb 03, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Problem Recent Solvers89

Suggested Problems

More from this Author56

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!