Higher-order functions: Difference between revisions

no edit summary
No edit summary
Line 1,356:
<lang slate>define: #function -> [| :x | x * 3 - 1].
#(1 1 2 3 5 8) collect: function.</lang>
 
=={{header|Smalltalk}}==
 
<lang Smalltalk>first := [ :f | f ].
second := [ 'second' ].
Transcript show: (first value: second) value.</lang>
 
=={{header|Standard ML}}==
Anonymous user