Cuneiform (programming language): Difference between revisions

Content deleted Content added
It's not based that older Swift, not on Apple's more famous Swift language, so make it somehow clearer?
m Parallel execution: {{pre}}, {{sxhl}}
Line 231:
For example, the following Cuneiform program allows the applications of <code>f</code> and <code>g</code> to run in parallel while <code>h</code> is dependent and can be started only when both <code>f</code> and <code>g</code> are finished.
 
<{{pre>|1=
let output-of-f : File = f();
let output-of-g : File = g();
 
h( f = output-of-f, g = output-of-g );
}}
</pre>
 
The following Cuneiform program creates three parallel applications of the function <code>f</code> by mapping <code>f</code> over a three-element list:
 
<{{pre>|1=
let xs : [File] =
['a.txt', 'b.txt', 'c.txt' : File];
Line 248:
: File
end;
}}
</pre>
 
Similarly, the applications of <code>f</code> and <code>g</code> are independent in the construction of the record <code>r</code> and can, thus, be run in parallel:
 
{{sxhl|lang=erlang|1=
<pre>
let r : <a : File, b : File> =
<a = f(), b = g()>;
}}
</pre>
 
==Examples==