diff options
author | Guillermo Ramos | 2012-05-03 14:11:55 +0200 |
---|---|---|
committer | Guillermo Ramos | 2012-05-05 14:35:04 +0200 |
commit | a36e9e7221841ffee75a8b35c07f3929240a0e17 (patch) | |
tree | 196fa58fa6c38c0179510c7e57dd96d9a1f03733 /io/listBrackets.io | |
parent | 83054326eb51ea73a8078a1e7feefae88107c3db (diff) | |
download | 7l-a36e9e7221841ffee75a8b35c07f3929240a0e17.tar.gz |
[Io] Día 3
Diffstat (limited to 'io/listBrackets.io')
-rw-r--r-- | io/listBrackets.io | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/io/listBrackets.io b/io/listBrackets.io new file mode 100644 index 0000000..cd099de --- /dev/null +++ b/io/listBrackets.io @@ -0,0 +1,12 @@ +List squareBrackets := method(idx, + call target at(idx) +) + +list("a", "b", "c", "d")[-3] println + +List curlyBrackets := method(n, + self map (*n) +) + +a := list(1,2,3,4,5) +a{a[-1]} println |