Jump to content

Greatest element of a list: Difference between revisions

(Add CLU)
Line 4,084:
 
The builtin <code>max</code> function can be applied to lists. <code style="font-family:'TI Uni'">max({1, 3, 2})</code> = 3.
 
=={{header|Transd}}==
<lang scheme>#lang transd
 
MainModule: {
_start: (λ
(textout (max 9 6 2 11 3 4) " ")
(with v [1, 45, 7, 274, -2, 34]
(textout (max-element v) " ")
(textout (max-element-idx v) " ")
))
}
 
}</lang>{{out}}
<pre>
11 274 3
</pre>
 
=={{header|Trith}}==
111

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.