12 lines
238 B
Text
12 lines
238 B
Text
{def nums 1 2 3 4 5}
|
|
-> nums
|
|
{S.reduce {lambda {:a :b} {+ :a :b}} {nums}}
|
|
-> 15
|
|
{S.reduce {lambda {:a :b} {- :a :b}} {nums}}
|
|
-> -13
|
|
{S.reduce {lambda {:a :b} {* :a :b}} {nums}}
|
|
-> 120
|
|
{S.reduce min {nums}}
|
|
-> 1
|
|
{S.reduce max {nums}}
|
|
-> 5
|