« first day (690 days earlier)
← previous day
next day →
last day (4167 days later) »
Dogbert
8:38 AM
Hey everyone! I need some help with GolfScript. How would you translate something like this into golfscript:
(1..5).map{|x| (1..5).map{|y| x * y}}
The output is [[1, 2, 3, 4, 5], [2, 4, 6, 8, 10], [3, 6, 9, 12, 15], ...]
3 hours later…
copy
11:54 AM
6,(; .{1${1$*}%\;}%
Might not be the shortest, but you get the point
copy.sh/golfscript/?c=NiwoOyAuezEkezEkKn0lXDt9JQ==
@Dogbert ping
3 hours later…
Dogbert
2:55 PM
@copy, thank you very much!
primo
@Dogbert 6,1> has the same effect as 6,(;
somehow seems cleaner to select the range you want, rather than poping off the first item, and then discarding it. But I think that's about as concise as it can get.
copy
You're welcome :-)
« first day (690 days earlier)
← previous day
next day →
last day (4167 days later) »
all rooms
Transcript for
Dec
12
Dec '12
19
Dec
21
The Nineteenth Byte
The Nineteenth Byte: General discussion for
codegolf.stackexc...
15
10
join this room
about this room
00:00
06:00
12:00
18:00
all times are UTC
site design / logo © 2024 Stack Exchange Inc;
legal
mobile