Higher-order functions: Difference between revisions

Content added Content deleted
(Add bruijn)
Line 542: Line 542:


p doit ->add 1 2 #prints 3</syntaxhighlight>
p doit ->add 1 2 #prints 3</syntaxhighlight>

=={{header|Bruijn}}==
Everything in bruijn is a function (including strings and numbers), so even <syntaxhighlight lang="bruijn">main [0]</syntaxhighlight> would be a valid solution since the argument of <code>main</code> is already a functional encoding of stdin.

A more obvious example:
<syntaxhighlight lang="bruijn">
first [0 [[0]]]

second [first [[1]]]

:test (second) ([[[[0]]]])
</syntaxhighlight>


=={{header|Burlesque}}==
=={{header|Burlesque}}==