Nested function: Difference between revisions

m
→‎{{header|Wren}}: Changed to Wren S/H
m (→‎{{header|Wren}}: Changed to Wren S/H)
 
(3 intermediate revisions by 2 users not shown)
Line 557:
 
=={{header|Elena}}==
ELENA 56.0x :
<syntaxhighlight lang="elena">import extensions;
Line 564:
var counter := 1;
var makeItem := (item){ var retVal := counter.toPrintable() + separator + item + (forward newLine)newLineConstant; counter += 1; ^ retVal };
^ makeItem("first") + makeItem("second") + makeItem("third")
Line 799:
=={{header|Fōrmulæ}}==
 
{{FormulaeEntry|page=https://formulae.org/?script=examples/Nested_function}}
Fōrmulæ programs are not textual, visualization/edition of programs is done showing/manipulating structures but not text. Moreover, there can be multiple visual representations of the same program. Even though it is possible to have textual representation &mdash;i.e. XML, JSON&mdash; they are intended for storage and transfer purposes more than visualization and edition.
 
'''Solution'''
Programs in Fōrmulæ are created/edited online in its [https://formulae.org website], However they run on execution servers. By default remote servers are used, but they are limited in memory and processing power, since they are intended for demonstration and casual use. A local server can be downloaded and installed, it has no limitations (it runs in your own computer). Because of that, example programs can be fully visualized and edited, but some of them will not run if they require a moderate or heavy computation/memory resources, and no local server is being used.
 
[[File:Fōrmulæ - Nested function 01.png]]
In '''[https://formulae.org/?example=Nested_function this]''' page you can see the program(s) related to this task and their results.
 
[[File:Fōrmulæ - Nested function 02.png]]
 
[[File:Fōrmulæ - Nested function 03.png]]
 
=={{header|Go}}==
Line 1,825 ⟶ 1,829:
 
=={{header|Wren}}==
<syntaxhighlight lang="ecmascriptwren">var makeList = Fn.new { |sep|
var counter = 0
var makeItem = Fn.new { |name|
9,486

edits