Re: pint: Elizabeth, sort list???

[email protected] (Marc Chantreux)
Newsgroups perl.perl6.users
Message-ID <Zel8qkJLqlU8h5xj@prometheus>
hello,

> How would you write that expression using the feed operator?

I tried

	< afoo12 afoo2 >
	==> {.sort: { | map { +$_ // $_ }, .split: /\d+/, :v }}
	==> {map &say}

and the error message is really interesting

	Only routine calls or variables that can '.append' may
	appear on either side of feed operators.

on the other hand: I really don't understand why ==> even exists
as method call syntax works well.

	< afoo12 afoo2 >
	.sort( { | map { +$_ // $_ }, .split: /\d+/, :v } )
	.map(&say)

what I would love instead is something closer than the haskell's $
operator with a very low priority so it could be possible to be
parenthesis free.

as example. I would like

	1..10 ==> map * * 2 ==> say

to be a joyful version of

	(1..10).map(* * 2).say

regards

-- 
Marc Chantreux
Pôle CESAR (Calcul et services avancés à la recherche)
Université de Strasbourg
14 rue René Descartes,
BP 80010, 67084 STRASBOURG CEDEX
03.68.85.60.79
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.