Anonymous user
Knuth's algorithm S: Difference between revisions
m
→{{header|Elena}}
(add Haskell implementation) |
|||
Line 564:
=={{header|Elena}}==
ELENA
<lang elena>import system'dynamic
import extensions
import system'routines
import system'collections
extension algorithmOp
{
s_of_n()
var counter :=
var n := self
^
eval(i)
{
▲ [
if (__target.Length <
{
};
▲ ^ __target value
}
}
}
public program()
{
var bin := Array
var s_of_n := 3
var sample := s_of_n
if (n == 9)
console
{{out}}
<pre>
|