all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
procedure shuffle(l)
|
||||
repeat {
|
||||
!l :=: ?l
|
||||
suspend l
|
||||
}
|
||||
end
|
||||
|
||||
procedure sorted(l)
|
||||
local i
|
||||
if (i := 2 to *l & l[i] >= l[i-1]) then return &fail else return 1
|
||||
end
|
||||
|
||||
procedure main()
|
||||
local l
|
||||
l := [6,3,4,5,1]
|
||||
|( shuffle(l) & sorted(l)) \1 & every writes(" ",!l)
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue