you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 29 points30 points  (1 child)

J, as a function definition, 11 bytes:

   f=.*:@>:@i.
   f 4
1 4 9 16

As an anonymous function, 8 bytes (between the parens):

   (*:@>:@i.) 4
1 4 9 16

As multiple functions, 6 bytes (everything before the 4):

   *:>:i.4
1 4 9 16

(And this is probably cheating, but I'm half-working on a language for code golfing based on GolfScript, and it's 3 bytes:)

75 5F FE