Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

perl6

Name: Anonymous 2010-11-09 11:12

why doesn't this work:

→ my &a = -> $x { $x * 2 }
_block518

→ for 1..5 &a
Missing block at line 2, near ""


or this:
map &say, 1..5

Name: Anonymous 2010-11-09 11:16

These on the other hand do work:

→ map &a, 1..4
2 4 6 8


→ for 1..5 -> $x { $x * 2 }
2 4 6 8 10

Name: Anonymous 2010-11-09 11:42

terrible!

Name: Anonymous 2010-11-09 12:05

Haskell somehow does without your extravagant non-ASCII character sets.

Name: Anonymous 2010-11-09 12:17

actually, → is just the prompt. I used try.rakudo.org.

Name: Anonymous 2010-11-09 12:30

Not implemented yet?

Name: Anonymous 2010-11-09 13:09

If you want to call a _block, you need to use parens. It's the law.

for needs to see code in {} unless it's used as a statement modifier.

You're running afoul of both issues with the last item. (map has an adverbial form that is pretty cool--no need to delimit a block--but I don't remember how to use it.)

Name: Anonymous 2010-11-09 14:33

>>4
Oh yeah. So does C. And assembly. You feel better now?

Name: Anonymous 2010-11-09 15:14

>>8
perl6 does both with and without. I thought that was a nice touch.

Name: Anonymous 2010-11-09 15:39

>>4,8,9
FIOC3000000 is fully Unicode-compliant and Y2K compliant.

Name: Anonymous 2010-11-09 17:56

>>10
iirc even perl4 was y2k compliant.

but I meant that perl6 has a lot of things like "french" (i.e. greek) quotes which can be typed with ascii equivalents. it's nice to be able to use different symbols for certain things. it improves readability... and golf.

it's still a long ways off from writing source files in latex, but I'll take what I can get.

Name: Anonymous 2010-11-09 18:22

>>11
Then you'll get what you deserve.

Name: Anonymous 2010-11-09 23:00

>>12
progress? or do you think non-ascii is a plague of doom?

Name: Anonymous 2011-02-03 2:05

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List