repo.or.cz
/
parrot.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tagged release 0.7.1
[parrot.git]
/
languages
/
tcl
/
runtime
/
builtin
/
lreverse.pir
blob
38b71971af2875e4d80f2dbca3d79be7f945fc84
1
.HLL 'Tcl', ''
2
.namespace []
3
4
.sub '&lreverse'
5
.param pmc argv :slurpy
6
7
.local int argc
8
argc = elements argv
9
if argc != 1 goto bad_args
10
11
.local pmc toList
12
toList = get_root_global ['_tcl'], 'toList'
13
14
$P0 = argv[0]
15
$P0 = toList($P0)
16
$P0 = clone $P0
17
$P0.'reverse'()
18
19
.return ($P0)
20
bad_args:
21
die 'wrong # args: should be "lreverse list"'
22
.end
23
24
# Local Variables:
25
# mode: pir
26
# fill-column: 100
27
# End:
28
# vim: expandtab shiftwidth=4 ft=pir: